]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - lfs/binutils
fontconfig: Not a package anymore.
[people/teissler/ipfire-2.x.git] / lfs / binutils
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302 3# IPFire.org - A linux based firewall #
46c2a9e3 4# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
70df8302
MT
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
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. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
93cb6ff2 27VER = 2.22
cd1a2927
MT
28
29THISAPP = binutils-$(VER)
30DL_FILE = $(THISAPP).tar.bz2
1751628e 31DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33
34# Normal build or /tools build.
35#
36ifeq "$(ROOT)" ""
37 TARGET = $(DIR_INFO)/$(THISAPP)
1d627130
MT
38 EXTRA_CONFIG = \
39 --prefix=/usr \
40 --enable-shared \
41 --disable-nls
857d9bf2
MT
42 EXTRA_MAKE = tooldir=/usr
43 EXTRA_INSTALL = tooldir=/usr
cd1a2927 44else
15679d9f 45ifeq "$(PASS)" "1"
222362c3 46 CFLAGS := $(patsubst -march=%,,$(CFLAGS))
cd1a2927 47 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
35a8f5f0
MT
48 EXTRA_CONFIG = \
49 --target=$(CROSSTARGET) \
50 --prefix=/tools \
51 --disable-nls \
52 --disable-werror
53 EXTRA_MAKE =
cd1a2927
MT
54 EXTRA_INSTALL =
55else
56 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
35a8f5f0
MT
57 EXTRA_ENV = \
58 CC="$(CROSSTARGET)-gcc -B/tools/lib/" \
59 AR="$(CROSSTARGET)-ar" \
60 RANLIB="$(CROSSTARGET)-ranlib"
61 EXTRA_CONFIG = \
62 --host=$(BUILDTARGET) \
63 --build=$(BUILDTARGET) \
64 --prefix=/tools \
65 --with-lib-path=/tools/lib \
66 --disable-nls
cd1a2927
MT
67 EXTRA_MAKE =
68 EXTRA_INSTALL =
69endif
70endif
71
cc72d5cb 72ifeq "$(MACHINE_TYPE)" "arm"
51f9e7ac 73 EXTRA_CONFIG += \
51f9e7ac 74 --with-abi=aapcs-linux \
35a8f5f0 75 --with-float=soft
51f9e7ac
MT
76endif
77
cd1a2927
MT
78###############################################################################
79# Top-level Rules
80###############################################################################
81
82objects = $(DL_FILE)
83
84$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
85
93cb6ff2 86$(DL_FILE)_MD5 = ee0f10756c84979622b992a4a61ea3f5
cd1a2927
MT
87
88install : $(TARGET)
89
90check : $(patsubst %,$(DIR_CHK)/%,$(objects))
91
92download :$(patsubst %,$(DIR_DL)/%,$(objects))
93
94md5 : $(subst %,%_MD5,$(objects))
95
96###############################################################################
97# Downloading, checking, md5sum
98###############################################################################
99
100$(patsubst %,$(DIR_CHK)/%,$(objects)) :
101 @$(CHECK)
102
103$(patsubst %,$(DIR_DL)/%,$(objects)) :
104 @$(LOAD)
105
106$(subst %,%_MD5,$(objects)) :
107 @$(MD5)
108
109###############################################################################
110# Installation Details
111###############################################################################
112
113$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
114 @$(PREBUILD)
115 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
116 @mkdir $(DIR_SRC)/binutils-build
fc5076e3
MT
117
118 # Prevent installing libiberty to lib64.
119 cd $(DIR_APP) && sed -i 's%\(^MULTIOSDIR = \).*%\1 ../lib%' libiberty/Makefile.in
120
35a8f5f0
MT
121 cd $(DIR_SRC)/binutils-build && $(EXTRA_ENV) MACHINE= $(DIR_APP)/configure $(EXTRA_CONFIG)
122 cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING) MACHINE=
123 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install MACHINE=
b4b6bcdb 124ifeq "$(ROOT)" ""
f97be0a6 125 cp -v $(DIR_APP)/include/libiberty.h /usr/include
cd1a2927 126else
35a8f5f0 127ifeq "$(PASS)" "2"
51f9e7ac
MT
128 cd $(DIR_SRC)/binutils-build && make -C ld clean MACHINE=
129 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib MACHINE=
dd714b8a 130 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
90d372c4 131endif
cd1a2927
MT
132endif
133 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build
134 @$(POSTBUILD)