Makefile 1.9 KB

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