]>
Commit | Line | Data |
---|---|---|
dd714b8a | 1 | ############################################################################### |
dd714b8a | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
3f8c9dc5 | 4 | # Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
dd714b8a | 7 | # it under the terms of the GNU General Public License as published by # |
70df8302 | 8 | # the Free Software Foundation, either version 3 of the License, or # |
dd714b8a MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
dd714b8a MT |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
70df8302 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
dd714b8a MT |
18 | # # |
19 | ############################################################################### | |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
15679d9f MT |
27 | VER = ipfire |
28 | ||
dd714b8a | 29 | THISAPP = cleanup-toolchain |
d0bba4d2 MT |
30 | |
31 | ifeq "$(TOOLCHAIN)" "1" | |
32 | TARGET = $(DIR_INFO)/$(THISAPP)-tools | |
33 | else | |
34 | TARGET = $(DIR_INFO)/$(THISAPP) | |
35 | endif | |
dd714b8a | 36 | |
7b321c2c | 37 | GCC_VER = 4.1.2 |
51f9e7ac | 38 | |
dd714b8a MT |
39 | ############################################################################### |
40 | # Top-level Rules | |
41 | ############################################################################### | |
42 | ||
43 | objects = | |
44 | ||
45 | install : $(TARGET) | |
46 | ||
47 | check : | |
48 | ||
49 | download : | |
50 | ||
51 | md5 : | |
52 | ||
53 | ############################################################################### | |
54 | # Installation Details | |
55 | ############################################################################### | |
56 | ||
57 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
58 | @$(PREBUILD) | |
174498ef MT |
59 | |
60 | ifeq "$(TOOLCHAIN)" "1" | |
025b7ad5 | 61 | # Remove the first cross compiler which is not needed anymore. |
6c4cc7ea | 62 | find $(TOOLS_DIR)/ -name "$(CROSSTARGET)*" | xargs rm -rfv |
025b7ad5 | 63 | |
fc44fa1f | 64 | # Remove man and info pages. |
6c4cc7ea | 65 | rm -rfv $(TOOLS_DIR)/{,share}/{info,man} |
fc44fa1f | 66 | |
fc44fa1f | 67 | # Fix ownership of the toolchain. |
6c4cc7ea | 68 | chown -R root:root $(TOOLS_DIR)/ |
f5ad8f59 MT |
69 | |
70 | # Update/create linker cache. | |
6c4cc7ea | 71 | $(TOOLS_DIR)/sbin/ldconfig |
bdc6837d MT |
72 | |
73 | # Set a marker when the toolchain was successfully built | |
6c4cc7ea | 74 | touch $(TOOLS_DIR)/.toolchain-successful |
174498ef | 75 | else |
6c4cc7ea MT |
76 | mv -v $(TOOLS_DIR)/bin/{ld,ld-old} |
77 | mv -v $(TOOLS_DIR)/$(BUILDTARGET)/bin/{ld,ld-old} | |
78 | mv -v $(TOOLS_DIR)/bin/{ld-new,ld} | |
79 | ln -sv $(TOOLS_DIR)/bin/ld $(TOOLS_DIR)/$(BUILDTARGET)/bin/ld | |
fc44fa1f MT |
80 | |
81 | gcc -dumpspecs | sed \ | |
6c4cc7ea | 82 | -e 's@$(TOOLS_DIR)@@g' \ |
fc44fa1f MT |
83 | -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ |
84 | -e '/\*cpp:/{n;s@$$@ -isystem /usr/include@}' > \ | |
85 | $$(dirname $$(gcc -print-libgcc-file-name))/specs | |
9b0ff0a0 | 86 | endif |
174498ef | 87 | |
dd714b8a | 88 | @$(POSTBUILD) |