]> git.ipfire.org Git - ipfire-2.x.git/blame_incremental - lfs/binutils
Neueste GnuMP3d-Version eingepflegt
[ipfire-2.x.git] / lfs / binutils
... / ...
CommitLineData
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# #
21###############################################################################
22
23###############################################################################
24# Definitions
25###############################################################################
26
27include Config
28
29VER = 2.16.1
30
31THISAPP = binutils-$(VER)
32DL_FILE = $(THISAPP).tar.bz2
33DL_FROM = $(URL_IPFIRE)
34DIR_APP = $(DIR_SRC)/$(THISAPP)
35
36# Normal build or /tools build.
37#
38ifeq "$(ROOT)" ""
39ifeq "$(LFS_PASS)" "install"
40 TARGET = $(DIR_INFO)/$(THISAPP)-install
41 EXTRA_CONFIG = --target=$(MACHINE)-linux-uclibc --prefix=/opt/$(MACHINE)-uClibc --disable-nls \
42 --with-sysroot=/opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc
43 EXTRA_MAKE =
44 EXTRA_INSTALL =
45else
46 TARGET = $(DIR_INFO)/$(THISAPP)
47 EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
48 EXTRA_MAKE = tooldir=/usr
49 EXTRA_INSTALL = tooldir=/usr
50endif
51else
52ifeq "$(PASS)" "1"
53 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
54 EXTRA_CONFIG = --prefix=/tools --disable-nls
55 EXTRA_MAKE = LDFLAGS="-all-static"
56 EXTRA_INSTALL =
57else
58 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
59 EXTRA_CONFIG = --prefix=/tools --with-lib-path=/tools/lib --disable-nls
60 EXTRA_MAKE =
61 EXTRA_INSTALL =
62endif
63endif
64
65###############################################################################
66# Top-level Rules
67###############################################################################
68
69objects = $(DL_FILE)
70
71$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
72
73$(DL_FILE)_MD5 = 6a9d529efb285071dad10e1f3d2b2967
74
75install : $(TARGET)
76
77check : $(patsubst %,$(DIR_CHK)/%,$(objects))
78
79download :$(patsubst %,$(DIR_DL)/%,$(objects))
80
81md5 : $(subst %,%_MD5,$(objects))
82
83###############################################################################
84# Downloading, checking, md5sum
85###############################################################################
86
87$(patsubst %,$(DIR_CHK)/%,$(objects)) :
88 @$(CHECK)
89
90$(patsubst %,$(DIR_DL)/%,$(objects)) :
91 @$(LOAD)
92
93$(subst %,%_MD5,$(objects)) :
94 @$(MD5)
95
96###############################################################################
97# Installation Details
98###############################################################################
99
100$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
101 @$(PREBUILD)
102 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
103 @mkdir $(DIR_SRC)/binutils-build
104ifeq "$(LFS_PASS)" "install"
105 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-conf.patch
106 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/binutils-uclibc-libtool-conf.patch
107endif
108 cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
109ifeq "$(PASS)" "1"
110 cd $(DIR_SRC)/binutils-build && make configure-host
111endif
112 cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
113 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
114ifeq "$(ROOT)" ""
115ifneq "$(LFS_PASS)" "install"
116 cp -v $(DIR_APP)/include/libiberty.h /usr/include
117endif
118else
119ifeq "$(PASS)" "1"
120 cd $(DIR_SRC)/binutils-build && make -C ld clean
121 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib
122 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
123else
124 cd $(DIR_SRC)/binutils-build && make -C ld clean
125 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
126 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
127endif
128endif
129 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build
130 @$(POSTBUILD)