1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
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. #
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. #
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 #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
21 ###############################################################################
23 ###############################################################################
25 ###############################################################################
31 THISAPP = binutils-$(VER)
32 DL_FILE = $(THISAPP).tar.bz2
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
36 # Normal build or /tools build.
39 ifeq "$(LFS_PASS)" "install"
40 TARGET = $(DIR_INFO)/$(THISAPP)-install
41 EXTRA_CONFIG = --prefix=/opt/$(MACHINE)-uClibc \
42 --build=$(MACHINE)-pc-linux-gnu \
43 --host=$(MACHINE)-pc-linux-gnu \
44 --target=$(MACHINE)-linux-uclibc \
51 TARGET = $(DIR_INFO)/$(THISAPP)
52 EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
53 EXTRA_MAKE = tooldir=/usr
54 EXTRA_INSTALL = tooldir=/usr
58 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
59 EXTRA_CONFIG = --prefix=/tools --disable-nls
60 EXTRA_MAKE = LDFLAGS="-all-static"
63 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
64 EXTRA_CONFIG = --prefix=/tools --with-lib-path=/tools/lib --disable-nls
70 ###############################################################################
72 ###############################################################################
76 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
78 $(DL_FILE)_MD5 = 6a9d529efb285071dad10e1f3d2b2967
82 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
84 download :$(patsubst %,$(DIR_DL)/%,$(objects))
86 md5 : $(subst %,%_MD5,$(objects))
88 ###############################################################################
89 # Downloading, checking, md5sum
90 ###############################################################################
92 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
95 $(patsubst %,$(DIR_DL)/%,$(objects)) :
98 $(subst %,%_MD5,$(objects)) :
101 ###############################################################################
102 # Installation Details
103 ###############################################################################
105 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
107 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
108 @mkdir $(DIR_SRC)/binutils-build
109 ifeq "$(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
113 cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
115 cd $(DIR_SRC)/binutils-build && make configure-host
117 cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
118 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
120 ifneq "$(LFS_PASS)" "install"
121 cp -v $(DIR_APP)/include/libiberty.h /usr/include
125 cd $(DIR_SRC)/binutils-build && make -C ld clean
126 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/tools/lib
127 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
129 cd $(DIR_SRC)/binutils-build && make -C ld clean
130 cd $(DIR_SRC)/binutils-build && make -C ld LIB_PATH=/usr/lib:/lib
131 cd $(DIR_SRC)/binutils-build && cp -v ld/ld-new /tools/bin
134 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build