]>
Commit | Line | Data |
---|---|---|
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 | # # | |
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 | ||
33 | include Config | |
34 | ||
35 | VER = 2.15.90.0.3 | |
36 | ||
37 | THISAPP = binutils-$(VER) | |
38 | DL_FILE = $(THISAPP).tar.bz2 | |
39 | DL_FROM = $(URL_KERNEL)/linux/devel/binutils | |
40 | DIR_APP = $(DIR_SRC)/$(THISAPP) | |
41 | ||
42 | # Normal build or /tools build. | |
43 | # | |
44 | ifeq "$(ROOT)" "" | |
45 | TARGET = $(DIR_INFO)/$(THISAPP) | |
46 | EXTRA_CONFIG = --prefix=/usr --enable-shared --disable-nls | |
47 | EXTRA_MAKE = | |
48 | EXTRA_INSTALL = | |
49 | else | |
50 | ifeq "$(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 = | |
55 | else | |
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 = | |
60 | endif | |
61 | endif | |
62 | ||
63 | ############################################################################### | |
64 | # Top-level Rules | |
65 | ############################################################################### | |
66 | ||
67 | objects = $(DL_FILE) | |
68 | ||
69 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
70 | ||
71 | $(DL_FILE)_MD5 = 1c1af0064ebd3d7bd99905874656a21e | |
72 | ||
73 | install : $(TARGET) | |
74 | ||
75 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
76 | ||
77 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
78 | ||
79 | md5 : $(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) | |
103 | ifeq "$(ROOT)" "" | |
104 | cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE) | |
105 | cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install | |
106 | else | |
107 | ifeq "$(LFS_PASS)" "1" | |
108 | cd $(DIR_SRC)/binutils-build && make configure-host | |
109 | endif | |
110 | cd $(DIR_SRC)/binutils-build && make -j 3 $(EXTRA_MAKE) | |
111 | cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install | |
112 | endif | |
113 | @rm -rf $(DIR_APP) $(DIR_SRC)/binutils-build | |
114 | @$(POSTBUILD) |