]> git.ipfire.org Git - ipfire-2.x.git/blame_incremental - lfs/binutils
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[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# Modifications by: #
22# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23# Modified Makefile for IPCop build #
24# #
25# $Id: binutils,v 1.4.2.3 2005/02/05 15:38:14 gespinasse Exp $
26# #
27###############################################################################
28
29###############################################################################
30# Definitions
31###############################################################################
32
33include Config
34
35VER = 2.15.90.0.3
36
37THISAPP = binutils-$(VER)
38DL_FILE = $(THISAPP).tar.bz2
39DL_FROM = $(URL_KERNEL)/linux/devel/binutils
40DIR_APP = $(DIR_SRC)/$(THISAPP)
41
42# Normal build or /tools build.
43#
44ifeq "$(ROOT)" ""
45 TARGET = $(DIR_INFO)/$(THISAPP)
46 EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls
47 EXTRA_MAKE =
48 EXTRA_INSTALL =
49else
50ifeq "$(LFS_PASS)" "1"
51 TARGET = $(DIR_INFO)/$(THISAPP)-tools1
52 EXTRA_CONFIG = --prefix=/tools --disable-nls
53 EXTRA_MAKE = LDFLAGS="-all-static"
54 EXTRA_INSTALL =
55else
56 TARGET = $(DIR_INFO)/$(THISAPP)-tools2
57 EXTRA_CONFIG = --prefix=/tools --enable-shared --with-lib-path=/tools/lib --disable-nls
58 EXTRA_MAKE =
59 EXTRA_INSTALL =
60endif
61endif
62
63###############################################################################
64# Top-level Rules
65###############################################################################
66
67objects = $(DL_FILE)
68
69$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
70
71$(DL_FILE)_MD5 = 1c1af0064ebd3d7bd99905874656a21e
72
73install : $(TARGET)
74
75check : $(patsubst %,$(DIR_CHK)/%,$(objects))
76
77download :$(patsubst %,$(DIR_DL)/%,$(objects))
78
79md5 : $(subst %,%_MD5,$(objects))
80
81###############################################################################
82# Downloading, checking, md5sum
83###############################################################################
84
85$(patsubst %,$(DIR_CHK)/%,$(objects)) :
86 @$(CHECK)
87
88$(patsubst %,$(DIR_DL)/%,$(objects)) :
89 @$(LOAD)
90
91$(subst %,%_MD5,$(objects)) :
92 @$(MD5)
93
94###############################################################################
95# Installation Details
96###############################################################################
97
98$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
99 @$(PREBUILD)
100 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
101 @mkdir $(DIR_SRC)/binutils-build
102 cd $(DIR_SRC)/binutils-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
103ifeq "$(ROOT)" ""
104 cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE)
105 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
106else
107ifeq "$(LFS_PASS)" "1"
108 cd $(DIR_SRC)/binutils-build && make configure-host
109endif
110 cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE)
111 cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
112endif
113 @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build
114 @$(POSTBUILD)