Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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:=binutils
  9. PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
  10. #"))
  11. PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
  12. ftp://gatekeeper.dec.com/pub/GNU/ \
  13. ftp://ftp.uu.net/archive/systems/gnu/ \
  14. ftp://ftp.eu.uu.net/pub/gnu/ \
  15. ftp://ftp.funet.fi/pub/gnu/prep/ \
  16. ftp://ftp.leo.org/pub/comp/os/unix/gnu/
  17. PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
  18. PATCH_DIR:=./patches/$(PKG_VERSION)
  19. STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
  20. BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
  21. include $(INCLUDE_DIR)/host-build.mk
  22. EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
  23. define Build/Configure
  24. $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
  25. (cd $(PKG_BUILD_DIR); \
  26. ./configure \
  27. --prefix=$(STAGING_DIR_HOST) \
  28. --build=$(GNU_HOST_NAME) \
  29. --host=$(GNU_HOST_NAME) \
  30. --target=$(REAL_GNU_TARGET_NAME) \
  31. --disable-werror \
  32. --disable-nls \
  33. $(EXTRA_TARGET) \
  34. $(SOFT_FLOAT_CONFIG_OPTION) \
  35. $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
  36. );
  37. endef
  38. define Build/Compile
  39. $(MAKE) -C $(PKG_BUILD_DIR) all
  40. endef
  41. define Build/Install
  42. $(MAKE) -C $(PKG_BUILD_DIR) install
  43. endef
  44. $(eval $(call HostBuild))