2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
10 PKG_VERSION
:=$(call qstrip
,$(CONFIG_BINUTILS_VERSION
))
12 PKG_SOURCE_URL
:=@GNU
/binutils
/
13 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 ifeq ($(PKG_VERSION
),2.16.1)
16 PKG_MD5SUM
:=6a9d529efb285071dad10e1f3d2b2967
18 ifeq ($(PKG_VERSION
),2.17)
19 PKG_MD5SUM
:=e26e2e06b6e4bf3acf1dc8688a94c0d1
21 ifeq ($(PKG_VERSION
),2.18)
22 PKG_MD5SUM
:=9d22ee4dafa3a194457caf4706f9cf01
25 PATCH_DIR
:=.
/patches
/$(PKG_VERSION
)
27 STAGING_DIR_HOST
:=$(TOOLCHAIN_DIR
)
28 BUILD_DIR_HOST
:=$(BUILD_DIR_TOOLCHAIN
)
29 override CONFIG_AUTOREBUILD
=
31 include $(INCLUDE_DIR
)/host-build.mk
33 EXTRA_TARGET
=$(if
$(CONFIG_EXTRA_TARGET_ARCH
),--enable-targets
=$(call qstrip
,$(CONFIG_EXTRA_TARGET_ARCH_NAME
))-linux-uclibc
)
35 define Build
/Configure
36 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/
37 (cd
$(PKG_BUILD_DIR
); \
39 --prefix=$(STAGING_DIR_HOST
) \
40 --build
=$(GNU_HOST_NAME
) \
41 --host
=$(GNU_HOST_NAME
) \
42 --target
=$(REAL_GNU_TARGET_NAME
) \
46 $(SOFT_FLOAT_CONFIG_OPTION
) \
47 $(call qstrip
,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS
)) \
52 $(MAKE
) -C
$(PKG_BUILD_DIR
) all
56 $(MAKE
) -C
$(PKG_BUILD_DIR
) install
59 $(eval
$(call HostBuild
))