Makefile 2.0 KB

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