2006-10-09 19:47:38 +00:00
|
|
|
# ==========================================================================
|
|
|
|
# Build system
|
|
|
|
# ==========================================================================
|
2006-10-05 10:17:08 +00:00
|
|
|
|
|
|
|
%.bflt: %_unstripped
|
|
|
|
$(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@
|
|
|
|
|
2006-10-19 22:17:44 +00:00
|
|
|
busybox.links: $(srctree)/applets/busybox.mkll $(srctree)/include/applets.h
|
2006-10-05 10:17:08 +00:00
|
|
|
$(Q)-$(SHELL) $^ >$@
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: $(srctree)/applets/install.sh busybox busybox.links
|
|
|
|
$(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
|
|
|
|
$(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS)
|
|
|
|
ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
|
|
|
|
@echo
|
|
|
|
@echo
|
|
|
|
@echo --------------------------------------------------
|
|
|
|
@echo You will probably need to make your busybox binary
|
|
|
|
@echo setuid root to ensure all configured applets will
|
|
|
|
@echo work properly.
|
|
|
|
@echo --------------------------------------------------
|
|
|
|
@echo
|
|
|
|
endif
|
|
|
|
|
|
|
|
uninstall: busybox.links
|
|
|
|
rm -f $(CONFIG_PREFIX)/bin/busybox
|
|
|
|
for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done
|
|
|
|
ifneq ($(strip $(DO_INSTALL_LIBS)),n)
|
|
|
|
for i in $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS); do \
|
|
|
|
rm -f $(CONFIG_PREFIX)$$i; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
|
|
|
check test: busybox
|
|
|
|
bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \
|
|
|
|
$(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:1=),-v)
|
|
|
|
|
|
|
|
### checkhelp:
|
|
|
|
### $(Q)$(srctree)/scripts/checkhelp.awk \
|
|
|
|
### $(wildcard $(patsubst %,%/Config.in,$(SRC_DIRS) ./))
|
|
|
|
|
|
|
|
.PHONY: sizes
|
|
|
|
sizes: busybox_unstripped
|
|
|
|
$(NM) --size-sort $(<)
|
|
|
|
|
|
|
|
.PHONY: bloatcheck
|
|
|
|
bloatcheck: busybox_old busybox_unstripped
|
|
|
|
@$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped
|
|
|
|
|
|
|
|
.PHONY: baseline
|
|
|
|
baseline: busybox_unstripped
|
|
|
|
@mv busybox_unstripped busybox_old
|
|
|
|
|
|
|
|
.PHONY: objsizes
|
|
|
|
objsizes: busybox_unstripped
|
2006-10-05 17:11:08 +00:00
|
|
|
$(srctree)/scripts/objsizes
|
2006-10-05 10:17:08 +00:00
|
|
|
|
|
|
|
# Documentation Targets
|
|
|
|
.PHONY: doc
|
|
|
|
doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
|
|
|
|
|
|
|
|
docs/busybox.pod: $(srctree)/docs/busybox_header.pod \
|
|
|
|
$(srctree)/include/usage.h \
|
|
|
|
$(srctree)/docs/busybox_footer.pod \
|
|
|
|
$(srctree)/docs/autodocifier.pl
|
|
|
|
$(disp_doc)
|
|
|
|
$(Q)-mkdir -p docs
|
|
|
|
$(Q)-( cat $(srctree)/docs/busybox_header.pod ; \
|
|
|
|
$(srctree)/docs/autodocifier.pl $(srctree)/include/usage.h ; \
|
|
|
|
cat $(srctree)/docs/busybox_footer.pod ; ) > docs/busybox.pod
|
|
|
|
|
|
|
|
docs/BusyBox.txt: docs/busybox.pod
|
|
|
|
$(disp_doc)
|
|
|
|
$(Q)-mkdir -p docs
|
|
|
|
$(Q)-pod2text $< > $@
|
|
|
|
|
|
|
|
docs/BusyBox.1: docs/busybox.pod
|
|
|
|
$(disp_doc)
|
|
|
|
$(Q)-mkdir -p docs
|
|
|
|
$(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \
|
|
|
|
$< > $@
|
|
|
|
|
|
|
|
docs/BusyBox.html: docs/busybox.net/BusyBox.html
|
|
|
|
$(disp_doc)
|
|
|
|
$(Q)-mkdir -p docs
|
|
|
|
$(Q)-rm -f docs/BusyBox.html
|
|
|
|
$(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html
|
|
|
|
|
|
|
|
docs/busybox.net/BusyBox.html: docs/busybox.pod
|
|
|
|
$(Q)-mkdir -p docs/busybox.net
|
|
|
|
$(Q)-pod2html --noindex $< > \
|
|
|
|
docs/busybox.net/BusyBox.html
|
|
|
|
$(Q)-rm -f pod2htm*
|
|
|
|
|
|
|
|
# documentation, cross-reference
|
|
|
|
# Modern distributions already ship synopsis packages (e.g. debian)
|
|
|
|
# If you have an old distribution go to http://synopsis.fresco.org/
|
|
|
|
syn_tgt := $(wildcard $(patsubst %,%/*.c,$(SRC_DIRS)))
|
|
|
|
syn := $(patsubst %.c, %.syn, $(syn_tgt))
|
|
|
|
|
|
|
|
%.syn: %.c
|
|
|
|
synopsis -p C -l Comments.SSDFilter,Comments.Previous $(INCS) -Wp,verbose,debug,preprocess,cppflags="'$(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) $(APPLETS_DEFINE) $(BUSYBOX_DEFINE)'" -o $@ $<
|
|
|
|
|
|
|
|
.PHONY: html
|
|
|
|
html: $(syn)
|
|
|
|
synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^
|