Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.3.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
  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. --disable-source-highlight
  51. CONFIGURE_VARS+= \
  52. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  53. TARGET_LDFLAGS+= \
  54. -static-libstdc++ \
  55. -Wl,--gc-sections
  56. define Build/Install
  57. $(MAKE) -C $(PKG_BUILD_DIR) \
  58. DESTDIR="$(PKG_INSTALL_DIR)" \
  59. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  60. install-gdb
  61. endef
  62. define Package/gdb/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  65. endef
  66. define Package/gdbserver/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  69. endef
  70. $(eval $(call BuildPackage,gdb))
  71. $(eval $(call BuildPackage,gdbserver))