build system cleanup/restructuring as described in http://lists.openwrt.org/pipermail...
[openwrt/staging/florian.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
13 PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
14 ftp://gatekeeper.dec.com/pub/GNU/ \
15 ftp://ftp.uu.net/archive/systems/gnu/ \
16 ftp://ftp.eu.uu.net/pub/gnu/ \
17 ftp://ftp.funet.fi/pub/gnu/prep/ \
18 ftp://ftp.leo.org/pub/comp/os/unix/gnu/
19
20 PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
21 PATCH_DIR:=./patches/$(PKG_VERSION)
22 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
23 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
24
25 include $(INCLUDE_DIR)/host-build.mk
26
27 define Build/Configure
28 (cd $(PKG_BUILD_DIR); \
29 ./configure \
30 --prefix=$(STAGING_DIR_HOST) \
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
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR) all
41 endef
42
43 define Build/Install
44 $(MAKE) -C $(PKG_BUILD_DIR) install
45 endef
46
47 $(eval $(call HostBuild))