Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. endef
  20. define Package/gdb
  21. $(call Package/gdb/Default)
  22. TITLE:=GNU Debugger
  23. DEPENDS+=+libreadline +libncurses
  24. endef
  25. define Package/gdb/description
  26. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  27. another program while it executes -- or what another program was doing at the
  28. moment it crashed.
  29. endef
  30. define Package/gdbserver
  31. $(call Package/gdb/Default)
  32. TITLE:=Remote server for GNU Debugger
  33. endef
  34. define Package/gdbserver/description
  35. GDBSERVER is a program that allows you to run GDB on a different machine than the
  36. one which is running the program being debugged.
  37. endef
  38. # XXX: add --disable-werror to prevent build failure with arm
  39. CONFIGURE_ARGS+= \
  40. --with-system-readline \
  41. --disable-werror
  42. CONFIGURE_VARS+= \
  43. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  44. define Build/Compile
  45. $(MAKE) -C $(PKG_BUILD_DIR) \
  46. DESTDIR="$(PKG_INSTALL_DIR)" \
  47. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  48. all
  49. $(MAKE) -C $(PKG_BUILD_DIR) \
  50. DESTDIR="$(PKG_INSTALL_DIR)" \
  51. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  52. install-gdb
  53. endef
  54. define Package/gdb/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  57. endef
  58. define Package/gdbserver/install
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  61. endef
  62. $(eval $(call BuildPackage,gdb))
  63. $(eval $(call BuildPackage,gdbserver))