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:=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/Compile
  51. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
  52. DESTDIR="$(PKG_INSTALL_DIR)" \
  53. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  54. all
  55. endef
  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))