Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gdb
  9. PKG_VERSION:=8.0.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=GPL-3.0+
  17. PKG_CPE_ID:=cpe:/a:gnu:gdb
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/gdb/Default
  20. SECTION:=devel
  21. CATEGORY:=Development
  22. DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @!arc
  23. URL:=http://www.gnu.org/software/gdb/
  24. endef
  25. define Package/gdb
  26. $(call Package/gdb/Default)
  27. TITLE:=GNU Debugger
  28. DEPENDS+=+libreadline +libncurses +zlib
  29. endef
  30. define Package/gdb/description
  31. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  32. another program while it executes -- or what another program was doing at the
  33. moment it crashed.
  34. endef
  35. define Package/gdbserver
  36. $(call Package/gdb/Default)
  37. TITLE:=Remote server for GNU Debugger
  38. endef
  39. define Package/gdbserver/description
  40. GDBSERVER is a program that allows you to run GDB on a different machine than the
  41. one which is running the program being debugged.
  42. endef
  43. # XXX: add --disable-werror to prevent build failure with arm
  44. CONFIGURE_ARGS+= \
  45. --with-system-readline \
  46. --without-expat \
  47. --without-lzma \
  48. --disable-sim \
  49. --disable-werror
  50. CONFIGURE_VARS+= \
  51. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  52. TARGET_LDFLAGS+= \
  53. -static-libstdc++ \
  54. -Wl,--gc-sections
  55. define Build/Install
  56. $(MAKE) -C $(PKG_BUILD_DIR) \
  57. DESTDIR="$(PKG_INSTALL_DIR)" \
  58. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  59. install-gdb
  60. endef
  61. define Package/gdb/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  64. endef
  65. define Package/gdbserver/install
  66. $(INSTALL_DIR) $(1)/usr/bin
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  68. endef
  69. $(eval $(call BuildPackage,gdb))
  70. $(eval $(call BuildPackage,gdbserver))