Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:=7.11.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=GPL-3.0+
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/gdb/Default
  19. SECTION:=devel
  20. CATEGORY:=Development
  21. DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @!arc
  22. URL:=http://www.gnu.org/software/gdb/
  23. endef
  24. define Package/gdb
  25. $(call Package/gdb/Default)
  26. TITLE:=GNU Debugger
  27. DEPENDS+=+libreadline +libncurses +zlib
  28. endef
  29. define Package/gdb/description
  30. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  31. another program while it executes -- or what another program was doing at the
  32. moment it crashed.
  33. endef
  34. define Package/gdbserver
  35. $(call Package/gdb/Default)
  36. TITLE:=Remote server for GNU Debugger
  37. endef
  38. define Package/gdbserver/description
  39. GDBSERVER is a program that allows you to run GDB on a different machine than the
  40. one which is running the program being debugged.
  41. endef
  42. # XXX: add --disable-werror to prevent build failure with arm
  43. CONFIGURE_ARGS+= \
  44. --with-system-readline \
  45. --without-expat \
  46. --without-lzma \
  47. --disable-werror
  48. CONFIGURE_VARS+= \
  49. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  50. define Build/Install
  51. $(MAKE) -C $(PKG_BUILD_DIR) \
  52. DESTDIR="$(PKG_INSTALL_DIR)" \
  53. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  54. install-gdb
  55. endef
  56. define Package/gdb/install
  57. $(INSTALL_DIR) $(1)/usr/bin
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  59. endef
  60. define Package/gdbserver/install
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  63. endef
  64. $(eval $(call BuildPackage,gdb))
  65. $(eval $(call BuildPackage,gdbserver))