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:=binutils
  9. PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#"))
  10. PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
  11. ftp://gatekeeper.dec.com/pub/GNU/ \
  12. ftp://ftp.uu.net/archive/systems/gnu/ \
  13. ftp://ftp.eu.uu.net/pub/gnu/ \
  14. ftp://ftp.funet.fi/pub/gnu/prep/ \
  15. ftp://ftp.leo.org/pub/comp/os/unix/gnu/
  16. PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
  17. PKG_MD5SUM:=unknown
  18. PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_CAT:=bzcat
  20. include $(INCLUDE_DIR)/host-build.mk
  21. define Build/Prepare
  22. $(call Build/Prepare/Default)
  23. if [ -d ./patches/$(PKG_VERSION) ]; then \
  24. $(SCRIPT_DIR)/patch-kernel.sh $(PKG_BUILD_DIR) ./patches/$(PKG_VERSION); \
  25. fi
  26. endef
  27. define Build/Configure
  28. (cd $(PKG_BUILD_DIR); \
  29. ./configure \
  30. --prefix=$(STAGING_DIR) \
  31. --build=$(GNU_HOST_NAME) \
  32. --host=$(GNU_HOST_NAME) \
  33. --target=$(REAL_GNU_TARGET_NAME) \
  34. --disable-werror \
  35. --disable-nls \
  36. );
  37. endef
  38. define Build/Compile
  39. $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) all
  40. endef
  41. define Build/Install
  42. $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) install
  43. endef
  44. $(eval $(call HostBuild))