Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright (C) 2006-2009 OpenWrt.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=gdb
  8. PKG_VERSION:=6.8
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=@GNU/gdb
  12. PKG_MD5SUM:=c9da266b884fb8fa54df786dfaadbc7a
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/gdb
  15. SECTION:=utils
  16. CATEGORY:=Utilities
  17. DEPENDS:=+libreadline +libncurses
  18. TITLE:=GNU Debugger
  19. endef
  20. define Package/gdbserver
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Remote server for GNU Debugger
  24. endef
  25. define Package/gdb/description
  26. GNU debugger
  27. endef
  28. define Package/gdbserver/description
  29. GDBSERVER is a program that allows you to run GDB on a different machine
  30. than the one which is running the program being debugged.
  31. endef
  32. CONFIGURE_ARGS+= \
  33. --with-system-readline
  34. CONFIGURE_VARS+= \
  35. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  36. define Build/Compile
  37. $(MAKE) -C $(PKG_BUILD_DIR) \
  38. DESTDIR="$(PKG_INSTALL_DIR)" \
  39. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  40. all install-gdb
  41. endef
  42. define Package/gdb/install
  43. $(INSTALL_DIR) $(1)/usr/bin
  44. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  45. endef
  46. define Package/gdbserver/install
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  49. endef
  50. $(eval $(call BuildPackage,gdb))
  51. $(eval $(call BuildPackage,gdbserver))