Makefile 2.0 KB

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