]>
Commit | Line | Data |
---|---|---|
cd1a2927 | 1 | ############################################################################### |
cd1a2927 | 2 | # # |
70df8302 | 3 | # IPFire.org - A linux based firewall # |
7d9a7d4d | 4 | # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # |
70df8302 MT |
5 | # # |
6 | # This program is free software: you can redistribute it and/or modify # | |
cd1a2927 | 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 # |
cd1a2927 MT |
9 | # (at your option) any later version. # |
10 | # # | |
70df8302 | 11 | # This program is distributed in the hope that it will be useful, # |
cd1a2927 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/>. # |
cd1a2927 | 18 | # # |
cd1a2927 MT |
19 | ############################################################################### |
20 | ||
21 | ############################################################################### | |
22 | # Definitions | |
23 | ############################################################################### | |
24 | ||
25 | include Config | |
26 | ||
be472d5a | 27 | PKG_NAME = ccache |
dd714b8a | 28 | VER = 2.4 |
7d9a7d4d | 29 | PKG_VER = 0 |
cd1a2927 | 30 | |
be472d5a | 31 | THISAPP = $(PKG_NAME)-$(VER) |
cd1a2927 | 32 | DL_FILE = $(THISAPP).tar.gz |
cd1a2927 | 33 | DIR_APP = $(DIR_SRC)/$(THISAPP) |
7d9a7d4d | 34 | |
6679675b | 35 | OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) |
7d9a7d4d MT |
36 | |
37 | MAINTAINER = | |
38 | GROUP = Development/Tools | |
39 | EXTRA = no | |
40 | DEBUG = no | |
41 | DEPS = | |
42 | ||
43 | URL = http://ccache.samba.org/ | |
44 | LICENSE = GPLv2+ | |
45 | SHORT_DESC = C/C++ compiler cache. | |
46 | ||
47 | define LONG_DESC | |
48 | ccache is a compiler cache. It acts as a caching pre-processor to \ | |
49 | C/C++ compilers, using the -E compiler switch and a hash to detect \ | |
50 | when a compilation can be satisfied from cache. This often results in \ | |
51 | a 5 to 10 times speedup in common compilations. | |
52 | endef | |
53 | ||
6e0756c3 | 54 | PREFIX = $(TOOLS_DIR)/usr |
cd1a2927 MT |
55 | |
56 | ############################################################################### | |
57 | # Top-level Rules | |
58 | ############################################################################### | |
59 | ||
db85c6af | 60 | objects = $(DL_FILE) \ |
7d9a7d4d | 61 | $(THISAPP).patch |
cd1a2927 | 62 | |
7d9a7d4d | 63 | download: $(objects) |
cd1a2927 | 64 | |
e4609c68 MT |
65 | info: |
66 | $(DO_PKG_INFO) | |
67 | ||
7d9a7d4d | 68 | install: $(OBJECT) |
cd1a2927 | 69 | |
7d9a7d4d MT |
70 | package: |
71 | @$(DO_PACKAGE) | |
cd1a2927 | 72 | |
7d9a7d4d MT |
73 | $(objects): |
74 | @$(LOAD) | |
cd1a2927 MT |
75 | |
76 | ############################################################################### | |
77 | # Installation Details | |
78 | ############################################################################### | |
79 | ||
6679675b | 80 | $(OBJECT) : |
cd1a2927 | 81 | @$(PREBUILD) |
7d9a7d4d | 82 | @rm -rf $(DIR_APP) && cd $(DIR_SRC) && $(EXTRACTOR) $(DIR_DL)/$(DL_FILE) |
9aa3c72c | 83 | cd $(DIR_APP) && patch -p0 < $(DIR_PATCHES)/$(THISAPP).patch |
7d9a7d4d MT |
84 | cd $(DIR_APP) && \ |
85 | CFLAGS="-O2 -static" \ | |
86 | ./configure \ | |
d0d44342 | 87 | $(CONFIGURE_ARCH) \ |
7d9a7d4d | 88 | --prefix=$(PREFIX) |
3d84c75d | 89 | cd $(DIR_APP) && make $(PARALLELISMFLAGS) |
cd1a2927 | 90 | cd $(DIR_APP) && make install |
c63cb505 MT |
91 | for i in gcc g++ cc; do \ |
92 | ln -sf ccache $(PREFIX)/bin/$${i}; \ | |
93 | ln -sf ccache $(PREFIX)/bin/$(IFS_TARGET)-$${i}; \ | |
94 | done | |
be472d5a | 95 | $(PREFIX)/bin/ccache -z |
cd1a2927 MT |
96 | @rm -rf $(DIR_APP) |
97 | @$(POSTBUILD) |