1 # ==========================================================================
3 # ==========================================================================
6 $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@
8 busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h
12 ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y)
13 INSTALL_OPTS:= --symlinks
15 ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y)
16 INSTALL_OPTS:= --hardlinks
18 install: $(srctree)/applets/install.sh busybox busybox.links
19 $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
20 $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)
21 ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
24 @echo --------------------------------------------------
25 @echo You will probably need to make your busybox binary
26 @echo setuid root to ensure all configured applets will
28 @echo --------------------------------------------------
32 uninstall: busybox.links
33 rm -f $(CONFIG_PREFIX)/bin/busybox
34 for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done
35 ifneq ($(strip $(DO_INSTALL_LIBS)),n)
36 for i in $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS); do \
37 rm -f $(CONFIG_PREFIX)$$i; \
42 bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \
43 $(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:1=),-v)
47 $(Q)$(srctree)/scripts/checkhelp.awk \
48 $(patsubst %,$(srctree)/%,$(wildcard $(patsubst %,%/Config.in,$(busybox-dirs) ./)))
51 sizes: busybox_unstripped
52 $(NM) --size-sort $(<)
55 bloatcheck: busybox_old busybox_unstripped
56 @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped
59 baseline: busybox_unstripped
60 @mv busybox_unstripped busybox_old
63 objsizes: busybox_unstripped
64 $(srctree)/scripts/objsizes
67 bigdata: busybox_unstripped
68 nm --size-sort busybox_unstripped | grep -vi ' [tr] ' | tail -20
70 # Documentation Targets
72 doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
74 docs/busybox.pod: $(srctree)/docs/busybox_header.pod \
75 $(srctree)/include/usage.h \
76 $(srctree)/docs/busybox_footer.pod \
77 $(srctree)/docs/autodocifier.pl
80 $(Q)-( cat $(srctree)/docs/busybox_header.pod ; \
81 $(srctree)/docs/autodocifier.pl $(srctree)/include/usage.h ; \
82 cat $(srctree)/docs/busybox_footer.pod ; ) > docs/busybox.pod
84 docs/BusyBox.txt: docs/busybox.pod
89 docs/BusyBox.1: docs/busybox.pod
92 $(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \
95 docs/BusyBox.html: docs/busybox.net/BusyBox.html
98 $(Q)-rm -f docs/BusyBox.html
99 $(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html
101 docs/busybox.net/BusyBox.html: docs/busybox.pod
102 $(Q)-mkdir -p docs/busybox.net
103 $(Q)-pod2html --noindex $< > \
104 docs/busybox.net/BusyBox.html
107 # documentation, cross-reference
108 # Modern distributions already ship synopsis packages (e.g. debian)
109 # If you have an old distribution go to http://synopsis.fresco.org/
110 syn_tgt = $(wildcard $(patsubst %,%/*.c,$(busybox-alldirs)))
111 syn = $(patsubst %.c, %.syn, $(syn_tgt))
117 SYN_CPPFLAGS := $(strip $(CPPFLAGS) $(EXTRA_CPPFLAGS))
118 SYN_CPPFLAGS := $(subst $(brace_open),\$(brace_open),$(SYN_CPPFLAGS))
119 SYN_CPPFLAGS := $(subst $(brace_close),\$(brace_close),$(SYN_CPPFLAGS))
120 #SYN_CPPFLAGS := $(subst ",\",$(SYN_CPPFLAGS))
122 #SYN_CPPFLAGS := [$(patsubst %,'%'$(comma),$(SYN_CPPFLAGS))'']
125 synopsis -p C -l Comments.SSDFilter,Comments.Previous -Wp,preprocess=True,cppflags="'$(SYN_CPPFLAGS)'" -o $@ $<
129 synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^