Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (C) 2006 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.3
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae
  12. PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb
  13. PKG_CAT:=bzcat
  14. PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/host-build.mk
  16. define Build/Configure
  17. (cd $(PKG_BUILD_DIR); \
  18. gdb_cv_func_sigsetjmp=yes \
  19. $(PKG_BUILD_DIR)/configure \
  20. --prefix=$(STAGING_DIR) \
  21. --build=$(GNU_HOST_NAME) \
  22. --host=$(GNU_HOST_NAME) \
  23. --target=$(REAL_GNU_TARGET_NAME) \
  24. $(DISABLE_NLS) \
  25. --without-uiout --disable-gdbmi \
  26. --disable-tui --disable-gdbtk --without-x \
  27. --without-included-gettext \
  28. --enable-threads \
  29. );
  30. endef
  31. define Build/Compile
  32. $(MAKE) -C $(PKG_BUILD_DIR)
  33. strip $(PKG_BUILD_DIR)/gdb/gdb
  34. endef
  35. define Build/Install
  36. (cd $(STAGING_DIR)/bin; \
  37. install -c $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb; \
  38. ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb; \
  39. );
  40. endef
  41. define Build/Clean
  42. rm -rf $(PKG_BUILD_DIR)
  43. rm -f $(STAGING_DIR)/bin/$(TARGET_CROSS)gdb
  44. rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  45. endef
  46. $(eval $(call HostBuild))