]> git.ipfire.org Git - ipfire-2.x.git/blame - lfs/binutils
Reiser4 Implementation abgeschlossen...
[ipfire-2.x.git] / lfs / binutils
CommitLineData
cd1a2927
MT
1###############################################################################
2# This file is part of the IPCop Firewall. #
3# #
4# IPCop is free software; you can redistribute it and/or modify #
5# it under the terms of the GNU General Public License as published by #
6# the Free Software Foundation; either version 2 of the License, or #
7# (at your option) any later version. #
8# #
9# IPCop is distributed in the hope that it will be useful, #
10# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12# GNU General Public License for more details. #
13# #
14# You should have received a copy of the GNU General Public License #
15# along with IPCop; if not, write to the Free Software #
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17# #
18# Makefiles are based on LFSMake, which is #
19# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20# #
cd1a2927
MT
21###############################################################################
22
23###############################################################################
24# Definitions
25###############################################################################
26
27include Config
28
dd714b8a 29VER = 2.16.1
cd1a2927
MT
30
31THISAPP = binutils-$(VER)
32DL_FILE = $(THISAPP).tar.bz2
1751628e 33DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
34DIR_APP = $(DIR_SRC)/$(THISAPP)
35
36# Normal build or /tools build.
37#
38ifeq "$(ROOT)" ""
bc9f0c12
MT
39ifeq "$(LFS_PASS)" "install"
40 TARGET = $(DIR_INFO)/$(THISAPP)-install
a50d04ab
MT
41 EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
42 --build=$(MACHINE)-pc-linux-gnu \
43 --host=$(MACHINE)-pc-linux-gnu \
44 --target=$(MACHINE)-linux-uclibc \
45 --disable-nls \
46 --enable-multilib \
47 --disable-werror
48 EXTRA_MAKE = all
49 EXTRA_INSTALL =
bc9f0c12 50else
cd1a2927
MT
51 TARGET = $(DIR_INFO)/$(THISAPP)
52 EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
857d9bf2
MT
53 EXTRA_MAKE = tooldir=/usr
54 EXTRA_INSTALL = tooldir=/usr
bc9f0c12 55endif
cd1a2927 56else
15679d9f 57ifeq "$(PASS)" "1"
cd1a2927
MT
58 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
59 EXTRA_CONFIG = --prefix=/tools --disable-nls
e22c7973 60 EXTRA_MAKE = LDFLAGS="-all-static"
cd1a2927
MT
61 EXTRA_INSTALL =
62else
63 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
dd714b8a 64 EXTRA_CONFIG = --prefix=/tools --with-lib-path=/tools/lib --disable-nls
cd1a2927
MT
65 EXTRA_MAKE =
66 EXTRA_INSTALL =
67endif
68endif
69
70###############################################################################
71# Top-level Rules
72###############################################################################
73
74objects = $(DL_FILE)
75
76$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
77
dd714b8a 78$(DL_FILE)_MD5 = 6a9d529efb285071dad10e1f3d2b2967
cd1a2927
MT
79
80install : $(TARGET)
81
82check : $(patsubst %,$(DIR_CHK)/%,$(objects))
83
84download :$(patsubst %,$(DIR_DL)/%,$(objects))
85
86md5 : $(subst %,%_MD5,$(objects))
87
88###############################################################################
89# Downloading, checking, md5sum
90###############################################################################
91
92$(patsubst %,$(DIR_CHK)/%,$(objects)) :
93 @$(CHECK)
94
95$(patsubst %,$(DIR_DL)/%,$(objects)) :
96 @$(LOAD)
97
98$(subst %,%_MD5,$(objects)) :
99 @$(MD5)
100
101###############################################################################
102# Installation Details
103###############################################################################
104
105$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
106 @$(PREBUILD)
107 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
108 @mkdir $(DIR_SRC)/binutils-build
bc9f0c12
MT
109ifeq "$(LFS_PASS)" "install"
110 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-conf.patch
111 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-libtool-conf.patch
112endif
cd1a2927 113 cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
e22c7973
MT
114ifeq "$(PASS)" "1"
115 cd $(DIR_SRC)/binutils-build && make configure-host
e22c7973 116endif
857d9bf2 117 cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
cd1a2927 118 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
b4b6bcdb 119ifeq "$(ROOT)" ""
bc9f0c12 120ifneq "$(LFS_PASS)" "install"
f97be0a6 121 cp -v $(DIR_APP)/include/libiberty.h /usr/include
bc9f0c12 122endif
cd1a2927 123else
15679d9f 124ifeq "$(PASS)" "1"
dd714b8a 125 cd $(DIR_SRC)/binutils-build && make -C ld clean
dd714b8a 126 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib
90d372c4 127 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
dd714b8a 128else
90d372c4 129 cd $(DIR_SRC)/binutils-build && make -C ld clean
dd714b8a 130 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
dd714b8a 131 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
90d372c4 132endif
cd1a2927
MT
133endif
134 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build
135 @$(POSTBUILD)