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