2006-06-27 08:44:04 +08:00
|
|
|
#
|
2008-11-09 05:18:33 +08:00
|
|
|
# Copyright (C) 2006-2008 OpenWrt.org
|
2006-06-27 08:44:04 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-06 11:34:52 +08:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
PKG_NAME:=binutils
|
2008-07-15 07:24:58 +08:00
|
|
|
PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2008-11-09 05:18:33 +08:00
|
|
|
PKG_SOURCE_URL:=@GNU/binutils/
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
|
|
|
|
ifeq ($(PKG_VERSION),2.17)
|
|
|
|
PKG_MD5SUM:=e26e2e06b6e4bf3acf1dc8688a94c0d1
|
|
|
|
endif
|
|
|
|
ifeq ($(PKG_VERSION),2.18)
|
|
|
|
PKG_MD5SUM:=9d22ee4dafa3a194457caf4706f9cf01
|
|
|
|
endif
|
2005-08-16 02:26:17 +08:00
|
|
|
|
2007-06-28 15:20:42 +08:00
|
|
|
PATCH_DIR:=./patches/$(PKG_VERSION)
|
2008-11-09 05:18:33 +08:00
|
|
|
|
2007-08-07 08:04:25 +08:00
|
|
|
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
|
|
|
|
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
|
2008-09-02 18:57:35 +08:00
|
|
|
override CONFIG_AUTOREBUILD=
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2008-04-13 07:14:42 +08:00
|
|
|
EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
|
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
define Build/Configure
|
2007-12-29 02:13:08 +08:00
|
|
|
$(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
|
2006-06-21 14:19:43 +08:00
|
|
|
(cd $(PKG_BUILD_DIR); \
|
|
|
|
./configure \
|
2007-08-07 08:04:25 +08:00
|
|
|
--prefix=$(STAGING_DIR_HOST) \
|
2005-07-20 22:58:27 +08:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--host=$(GNU_HOST_NAME) \
|
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
|
|
|
--disable-werror \
|
2006-06-21 14:19:43 +08:00
|
|
|
--disable-nls \
|
2008-04-13 07:14:42 +08:00
|
|
|
$(EXTRA_TARGET) \
|
2007-12-29 02:06:47 +08:00
|
|
|
$(SOFT_FLOAT_CONFIG_OPTION) \
|
2007-10-23 14:23:20 +08:00
|
|
|
$(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
|
2006-06-21 14:19:43 +08:00
|
|
|
);
|
|
|
|
endef
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
define Build/Compile
|
2007-08-07 08:04:25 +08:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) all
|
2006-06-21 14:19:43 +08:00
|
|
|
endef
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
define Build/Install
|
2007-08-07 08:04:25 +08:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) install
|
2006-06-21 14:19:43 +08:00
|
|
|
endef
|
2005-07-20 22:58:27 +08:00
|
|
|
|
2006-06-21 14:19:43 +08:00
|
|
|
$(eval $(call HostBuild))
|