source: trunk/toolchain/binutils/Makefile @ 14196

Last change on this file since 14196 was 14196, checked in by nbd, 8 years ago

install readelf to STAGING_DIR_HOST (eglibc requires it, not all systems have it)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
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#
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=binutils
10PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION))
11
12PKG_SOURCE_URL:=@GNU/binutils/
13PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
14
15ifeq ($(PKG_VERSION),2.17)
16  PKG_MD5SUM:=e26e2e06b6e4bf3acf1dc8688a94c0d1
17endif
18ifeq ($(PKG_VERSION),2.18)
19  PKG_MD5SUM:=9d22ee4dafa3a194457caf4706f9cf01
20endif
21ifeq ($(PKG_VERSION),2.19)
22  PKG_MD5SUM:=17a52219dee5a76c1a9d9b0bfd337d66
23endif
24
25PATCH_DIR:=./patches/$(PKG_VERSION)
26
27REAL_STAGING_DIR_HOST:=$(STAGING_DIR_HOST)
28STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
29BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
30
31override CONFIG_AUTOREBUILD=
32
33include $(INCLUDE_DIR)/host-build.mk
34
35EXTRA_TARGET=$(if $(CONFIG_EXTRA_TARGET_ARCH),--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX))
36
37define Build/Prepare
38        $(call Build/Prepare/Default)
39        ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
40        $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
41endef
42
43define Build/Configure
44        (cd $(PKG_BUILD_DIR); \
45                ./configure \
46                --prefix=$(TOOLCHAIN_DIR)/usr \
47                --build=$(GNU_HOST_NAME) \
48                --host=$(GNU_HOST_NAME) \
49                --target=$(REAL_GNU_TARGET_NAME) \
50                --with-sysroot=$(TOOLCHAIN_DIR) \
51                --disable-multilib \
52                --disable-werror \
53                --disable-nls \
54                $(EXTRA_TARGET) \
55                $(SOFT_FLOAT_CONFIG_OPTION) \
56                $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
57        );
58endef
59
60define Build/Compile
61        $(MAKE) -C $(PKG_BUILD_DIR) all
62endef
63
64define Build/Install
65        $(MAKE) -C $(PKG_BUILD_DIR) install
66        $(CP) $(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
67endef
68
69define Build/Clean
70        rm -rf \
71                $(PKG_BUILD_DIR) \
72                $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
73endef
74
75$(eval $(call HostBuild))
Note: See TracBrowser for help on using the repository browser.