add md5sums for binutils & gcc and use the GNU mirror facility
[openwrt/svn-archive/archive.git] / toolchain / binutils / Makefile
1 #
2 # Copyright (C) 2006-2008 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:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
11
12 PKG_SOURCE_URL:=@GNU/binutils/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14
15 ifeq ($(PKG_VERSION),2.16.1)
16 PKG_MD5SUM:=6a9d529efb285071dad10e1f3d2b2967
17 endif
18 ifeq ($(PKG_VERSION),2.17)
19 PKG_MD5SUM:=e26e2e06b6e4bf3acf1dc8688a94c0d1
20 endif
21 ifeq ($(PKG_VERSION),2.18)
22 PKG_MD5SUM:=9d22ee4dafa3a194457caf4706f9cf01
23 endif
24
25 PATCH_DIR:=./patches/$(PKG_VERSION)
26
27 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
28 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
29 override CONFIG_AUTOREBUILD=
30
31 include $(INCLUDE_DIR)/host-build.mk
32
33 EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-uclibc)
34
35 define Build/Configure
36 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
37 (cd $(PKG_BUILD_DIR); \
38 ./configure \
39 --prefix=$(STAGING_DIR_HOST) \
40 --build=$(GNU_HOST_NAME) \
41 --host=$(GNU_HOST_NAME) \
42 --target=$(REAL_GNU_TARGET_NAME) \
43 --disable-werror \
44 --disable-nls \
45 $(EXTRA_TARGET) \
46 $(SOFT_FLOAT_CONFIG_OPTION) \
47 $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
48 );
49 endef
50
51 define Build/Compile
52 $(MAKE) -C $(PKG_BUILD_DIR) all
53 endef
54
55 define Build/Install
56 $(MAKE) -C $(PKG_BUILD_DIR) install
57 endef
58
59 $(eval $(call HostBuild))