Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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:=11.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94
  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. include $(INCLUDE_DIR)/nls.mk
  20. define Package/gdb/Default
  21. SECTION:=devel
  22. CATEGORY:=Development
  23. DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS)
  24. URL:=https://www.gnu.org/software/gdb/
  25. endef
  26. define Package/gdb
  27. $(call Package/gdb/Default)
  28. TITLE:=GNU Debugger
  29. DEPENDS+=+libreadline +libncurses +zlib +libgmp
  30. endef
  31. define Package/gdb/description
  32. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  33. another program while it executes -- or what another program was doing at the
  34. moment it crashed.
  35. endef
  36. define Package/gdbserver
  37. $(call Package/gdb/Default)
  38. TITLE:=Remote server for GNU Debugger
  39. endef
  40. define Package/gdbserver/description
  41. GDBSERVER is a program that allows you to run GDB on a different machine than the
  42. one which is running the program being debugged.
  43. endef
  44. # XXX: add --disable-werror to prevent build failure with arm
  45. CONFIGURE_ARGS+= \
  46. --with-system-readline \
  47. --with-system-zlib \
  48. --without-expat \
  49. --without-lzma \
  50. --disable-unit-tests \
  51. --disable-ubsan \
  52. --disable-sim \
  53. --disable-werror \
  54. --disable-source-highlight \
  55. --without-mpc \
  56. --without-mpfr \
  57. --without-isl \
  58. --with-libgmp-prefix=$(STAGING_DIR)/usr
  59. CONFIGURE_VARS+= \
  60. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  61. TARGET_LDFLAGS+= \
  62. $(INTL_LDFLAGS) $(if $(INTL_FULL),-lintl) \
  63. -static-libstdc++ \
  64. -Wl,--gc-sections
  65. define Build/Install
  66. $(MAKE) -C $(PKG_BUILD_DIR) \
  67. DESTDIR="$(PKG_INSTALL_DIR)" \
  68. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  69. install-gdb install-gdbserver
  70. endef
  71. define Package/gdb/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  74. endef
  75. define Package/gdbserver/install
  76. $(INSTALL_DIR) $(1)/usr/bin
  77. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  78. endef
  79. $(eval $(call BuildPackage,gdb))
  80. $(eval $(call BuildPackage,gdbserver))