]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/strip
s/TARGET/OBJECT/g
[ipfire-3.x.git] / lfs / strip
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
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 #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 PKG_NAME = strip
28 VER = LFS
29
30 THISAPP = $(PKG_NAME)-$(VER)
31 OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
32
33 ###############################################################################
34 # Top-level Rules
35 ###############################################################################
36
37 install : $(OBJECT)
38
39 download :
40
41 ###############################################################################
42 # Installation Details
43 ###############################################################################
44
45 $(OBJECT) :
46
47 ifeq "$(STAGE)" "toolchain"
48 -strip --strip-debug $(TOOLS_DIR)/lib/*
49 -strip --strip-all $(TOOLS_DIR)/{,usr/}{,s}bin/*
50 -rm -rf $(TOOLS_DIR)/{,share/}{info,man} \
51 $(TOOLS_DIR)/usr/{share,man,info} \
52 $(TOOLS_DIR)/share/locale/* \
53 $(TOOLS_DIR)/var
54 chown -R root:root $(LFS)$(TOOLS_DIR)
55 endif
56
57 ifeq "$(STAGE)" "packages"
58 -$(TOOLS_DIR)/bin/find $(LFS)/{,usr/}{bin,lib,sbin} -type f -exec \
59 $(TOOLS_DIR)/bin/strip --strip-debug '{}' ';' &>/dev/null
60 -$(TOOLS_DIR)/bin/find $(LFS)/{,usr/}{bin,sbin} -type f -exec \
61 $(TOOLS_DIR)/bin/strip --strip-all '{}' ';' &>/dev/null
62 endif