2
0

Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # Copyright (C) 2006-2009 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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  11. PKG_MD5SUM:=c9da266b884fb8fa54df786dfaadbc7a
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. include $(INCLUDE_DIR)/toolchain-build.mk
  14. define Host/Configure
  15. (cd $(HOST_BUILD_DIR); \
  16. gdb_cv_func_sigsetjmp=yes \
  17. CFLAGS="-O2" \
  18. $(HOST_BUILD_DIR)/configure \
  19. --prefix=$(TOOLCHAIN_DIR)/usr \
  20. --build=$(GNU_HOST_NAME) \
  21. --host=$(GNU_HOST_NAME) \
  22. --target=$(REAL_GNU_TARGET_NAME) \
  23. --disable-werror \
  24. $(DISABLE_NLS) \
  25. --without-uiout \
  26. --disable-tui --disable-gdbtk --without-x \
  27. --without-included-gettext \
  28. --enable-threads \
  29. );
  30. endef
  31. define Host/Compile
  32. $(MAKE) -C $(HOST_BUILD_DIR)
  33. endef
  34. define Host/Install
  35. mkdir -p $(TOOLCHAIN_DIR)/usr/bin
  36. $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
  37. ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
  38. strip $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
  39. endef
  40. define Host/Clean
  41. rm -rf \
  42. $(HOST_BUILD_DIR) \
  43. $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb \
  44. $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
  45. endef
  46. $(eval $(call HostBuild))