1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
27 ifeq "$(MACHINE_TYPE)" "arm"
33 THISAPP = binutils-$(VER)
34 DL_FILE = $(THISAPP).tar.bz2
35 DL_FROM = $(URL_IPFIRE)
36 DIR_APP = $(DIR_SRC)/$(THISAPP)
38 # XXX maybe we can remove that ugly MACHINE= by this
41 # Normal build or /tools build.
44 ifeq "$(LFS_PASS)" "install"
45 TARGET = $(DIR_INFO)/$(THISAPP)-install
46 EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
47 --build=$(MACHINE)-pc-linux-gnu \
48 --host=$(MACHINE)-pc-linux-gnu \
49 --target=$(MACHINE)-linux-uclibc \
56 TARGET = $(DIR_INFO)/$(THISAPP)
57 EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
58 EXTRA_MAKE = tooldir=/usr
59 EXTRA_INSTALL = tooldir=/usr
63 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
64 EXTRA_CONFIG = --prefix=/tools --disable-nls --disable-werror --disable-gprof
65 #EXTRA_MAKE = LDFLAGS="-all-static"
68 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
69 EXTRA_CONFIG = --prefix=/tools --with-lib-path=/tools/lib --disable-nls
75 ifeq "$(MACHINE_TYPE)" "arm"
77 --host=$(BUILDTARGET) \
78 --build=$(BUILDTARGET) \
79 --target=$(BUILDTARGET) \
80 --with-abi=aapcs-linux \
84 ###############################################################################
86 ###############################################################################
90 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
92 ifeq "$(MACHINE_TYPE)" "arm"
93 $(DL_FILE)_MD5 = 9d22ee4dafa3a194457caf4706f9cf01
95 $(DL_FILE)_MD5 = e26e2e06b6e4bf3acf1dc8688a94c0d1
100 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
102 download :$(patsubst %,$(DIR_DL)/%,$(objects))
104 md5 : $(subst %,%_MD5,$(objects))
106 ###############################################################################
107 # Downloading, checking, md5sum
108 ###############################################################################
110 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
113 $(patsubst %,$(DIR_DL)/%,$(objects)) :
116 $(subst %,%_MD5,$(objects)) :
119 ###############################################################################
120 # Installation Details
121 ###############################################################################
123 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
125 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
126 @mkdir $(DIR_SRC)/binutils-build
127 cd $(DIR_SRC)/binutils-build && MACHINE= $(DIR_APP)/configure $(EXTRA_CONFIG)
129 cd $(DIR_SRC)/binutils-build && make configure-host MAKEINFO=makeinfo MACHINE=
131 cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING) MAKEINFO=makeinfo MACHINE=
132 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install MAKEINFO=makeinfo MACHINE=
134 ifneq "$(LFS_PASS)" "install"
135 cp -v $(DIR_APP)/include/libiberty.h /usr/include
139 cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
140 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib MACHINE=
141 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
143 cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
144 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib MACHINE=
145 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
148 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build