Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
  15. BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. define Build/Configure
  18. (cd $(PKG_BUILD_DIR); \
  19. gdb_cv_func_sigsetjmp=yes \
  20. $(PKG_BUILD_DIR)/configure \
  21. --prefix=$(TOOLCHAIN_DIR) \
  22. --build=$(GNU_HOST_NAME) \
  23. --host=$(GNU_HOST_NAME) \
  24. --target=$(REAL_GNU_TARGET_NAME) \
  25. $(DISABLE_NLS) \
  26. --without-uiout --disable-gdbmi \
  27. --disable-tui --disable-gdbtk --without-x \
  28. --without-included-gettext \
  29. --enable-threads \
  30. );
  31. endef
  32. define Build/Compile
  33. $(MAKE) -C $(PKG_BUILD_DIR)
  34. strip $(PKG_BUILD_DIR)/gdb/gdb
  35. endef
  36. define Build/Install
  37. $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  38. ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  39. endef
  40. define Build/Clean
  41. rm -rf $(PKG_BUILD_DIR)
  42. rm -f $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  43. rm -f $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  44. endef
  45. $(eval $(call HostBuild))