Contents of /trunk/mkinitrd-magellan/busybox/Makefile.custom
Parent Directory | Revision Log
Revision 1123 -
(show annotations)
(download)
Wed Aug 18 21:56:57 2010 UTC (14 years, 2 months ago) by niro
File size: 5628 byte(s)
Wed Aug 18 21:56:57 2010 UTC (14 years, 2 months ago) by niro
File size: 5628 byte(s)
-updated to busybox-1.17.1
1 | # ========================================================================== |
2 | # Build system |
3 | # ========================================================================== |
4 | |
5 | busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h include/applets.h |
6 | $(Q)-$(SHELL) $^ >$@ |
7 | |
8 | .PHONY: install |
9 | ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y) |
10 | INSTALL_OPTS:= --symlinks |
11 | endif |
12 | ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y) |
13 | INSTALL_OPTS:= --hardlinks |
14 | endif |
15 | ifeq ($(CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS),y) |
16 | ifeq ($(CONFIG_INSTALL_SH_APPLET_SYMLINK),y) |
17 | INSTALL_OPTS:= --sw-sh-sym |
18 | endif |
19 | ifeq ($(CONFIG_INSTALL_SH_APPLET_HARDLINK),y) |
20 | INSTALL_OPTS:= --sw-sh-hard |
21 | endif |
22 | ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y) |
23 | INSTALL_OPTS:= --scriptwrapper |
24 | endif |
25 | endif |
26 | install: $(srctree)/applets/install.sh busybox busybox.links |
27 | $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \ |
28 | $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS) |
29 | ifeq ($(strip $(CONFIG_FEATURE_SUID)),y) |
30 | @echo |
31 | @echo |
32 | @echo -------------------------------------------------- |
33 | @echo You will probably need to make your busybox binary |
34 | @echo setuid root to ensure all configured applets will |
35 | @echo work properly. |
36 | @echo -------------------------------------------------- |
37 | @echo |
38 | endif |
39 | |
40 | uninstall: busybox.links |
41 | rm -f $(CONFIG_PREFIX)/bin/busybox |
42 | for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done |
43 | ifneq ($(strip $(DO_INSTALL_LIBS)),n) |
44 | for i in $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS); do \ |
45 | rm -f $(CONFIG_PREFIX)$$i; \ |
46 | done |
47 | endif |
48 | |
49 | # Not very elegant: copies testsuite to objdir... |
50 | # (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be)) |
51 | .PHONY: check |
52 | .PHONY: test |
53 | check test: busybox busybox.links |
54 | test -d $(objtree)/testsuite || cp -pPR $(srctree)/testsuite $(objtree) |
55 | bindir=$(objtree) srcdir=$(srctree)/testsuite \ |
56 | $(SHELL) -c "cd $(objtree)/testsuite && $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)" |
57 | |
58 | .PHONY: release |
59 | release: distclean |
60 | cd ..; \ |
61 | rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \ |
62 | cp -pPR busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ |
63 | find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ |
64 | -name .svn \ |
65 | -print \ |
66 | -exec rm -r -f {} \; ; \ |
67 | find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ |
68 | -name .git \ |
69 | -print \ |
70 | -exec rm -r -f {} \; ; \ |
71 | find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type f \ |
72 | -name .\#* \ |
73 | -print \ |
74 | -exec rm -f {} \; ; \ |
75 | tar -czf busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION).tar.gz \ |
76 | busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ ; } |
77 | |
78 | .PHONY: checkhelp |
79 | checkhelp: |
80 | $(Q)$(srctree)/scripts/checkhelp.awk \ |
81 | $(patsubst %,$(srctree)/%,$(wildcard $(patsubst %,%/Config.in,$(busybox-dirs) ./))) |
82 | |
83 | .PHONY: sizes |
84 | sizes: busybox_unstripped |
85 | $(NM) --size-sort $(<) |
86 | |
87 | .PHONY: bloatcheck |
88 | bloatcheck: busybox_old busybox_unstripped |
89 | @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped |
90 | @$(CROSS_COMPILE)size busybox_old busybox_unstripped |
91 | |
92 | .PHONY: baseline |
93 | baseline: busybox_unstripped |
94 | @mv busybox_unstripped busybox_old |
95 | |
96 | .PHONY: objsizes |
97 | objsizes: busybox_unstripped |
98 | $(srctree)/scripts/objsizes |
99 | |
100 | .PHONY: stksizes |
101 | stksizes: busybox_unstripped |
102 | $(CROSS_COMPILE)objdump -d busybox_unstripped | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq |
103 | |
104 | .PHONY: bigdata |
105 | bigdata: busybox_unstripped |
106 | $(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [trw] ' |
107 | |
108 | # Documentation Targets |
109 | .PHONY: doc |
110 | doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html |
111 | |
112 | # FIXME: Doesn't belong here |
113 | cmd_doc = |
114 | quiet_cmd_doc = $(Q)echo " DOC $(@F)" |
115 | silent_cmd_doc = |
116 | disp_doc = $($(quiet)cmd_doc) |
117 | |
118 | # sed adds newlines after "Options:" etc, |
119 | # this is needed in order to get good BusyBox.{1,txt,html} |
120 | docs/busybox.pod: $(srctree)/docs/busybox_header.pod \ |
121 | include/usage.h \ |
122 | $(srctree)/docs/busybox_footer.pod \ |
123 | applets/usage_pod |
124 | $(disp_doc) |
125 | $(Q)-mkdir -p docs |
126 | $(Q)-( \ |
127 | cat $(srctree)/docs/busybox_header.pod; \ |
128 | applets/usage_pod | sed 's/^[A-Za-z][A-Za-z ]*[a-z]:$$/&\n/'; \ |
129 | cat $(srctree)/docs/busybox_footer.pod; \ |
130 | ) > docs/busybox.pod |
131 | |
132 | docs/BusyBox.txt: docs/busybox.pod |
133 | $(disp_doc) |
134 | $(Q)-mkdir -p docs |
135 | $(Q)-pod2text $< > $@ |
136 | |
137 | docs/BusyBox.1: docs/busybox.pod |
138 | $(disp_doc) |
139 | $(Q)-mkdir -p docs |
140 | $(Q)-pod2man --center=BusyBox --release="version $(KERNELVERSION)" $< > $@ |
141 | |
142 | docs/BusyBox.html: docs/busybox.net/BusyBox.html |
143 | $(disp_doc) |
144 | $(Q)-mkdir -p docs |
145 | $(Q)-rm -f docs/BusyBox.html |
146 | $(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html |
147 | |
148 | docs/busybox.net/BusyBox.html: docs/busybox.pod |
149 | $(Q)-mkdir -p docs/busybox.net |
150 | $(Q)-pod2html --noindex $< > $@ |
151 | $(Q)-rm -f pod2htm* |
152 | |
153 | # documentation, cross-reference |
154 | # Modern distributions already ship synopsis packages (e.g. debian) |
155 | # If you have an old distribution go to http://synopsis.fresco.org/ |
156 | syn_tgt = $(wildcard $(patsubst %,%/*.c,$(busybox-alldirs))) |
157 | syn = $(patsubst %.c, %.syn, $(syn_tgt)) |
158 | |
159 | comma:= , |
160 | brace_open:= ( |
161 | brace_close:= ) |
162 | |
163 | SYN_CPPFLAGS := $(strip $(CPPFLAGS) $(EXTRA_CPPFLAGS)) |
164 | SYN_CPPFLAGS := $(subst $(brace_open),\$(brace_open),$(SYN_CPPFLAGS)) |
165 | SYN_CPPFLAGS := $(subst $(brace_close),\$(brace_close),$(SYN_CPPFLAGS)) |
166 | #SYN_CPPFLAGS := $(subst ",\",$(SYN_CPPFLAGS)) |
167 | #") |
168 | #SYN_CPPFLAGS := [$(patsubst %,'%'$(comma),$(SYN_CPPFLAGS))''] |
169 | |
170 | %.syn: %.c |
171 | synopsis -p C -l Comments.SSDFilter,Comments.Previous -Wp,preprocess=True,cppflags="'$(SYN_CPPFLAGS)'" -o $@ $< |
172 | |
173 | .PHONY: html |
174 | html: $(syn) |
175 | synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^ |
176 | |
177 | -include $(srctree)/Makefile.local |