X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile.custom;h=58a979e11289e4e08da4848989a782edb6922ccc;hb=9b44613202a6f2f080ec23746d0680dcef88628d;hp=0cc40a667926155cac235a11dae2e28a75b7960c;hpb=aae82e0d8b3a1f01f230b29ee3e9c9939c89d688;p=oweals%2Fbusybox.git diff --git a/Makefile.custom b/Makefile.custom index 0cc40a667..58a979e11 100644 --- a/Makefile.custom +++ b/Makefile.custom @@ -2,9 +2,6 @@ # Build system # ========================================================================== -%.bflt: %_unstripped - $(CROSS_COMPILE)elf2flt $(ELF2FLTFLAGS) $< -o $@ - busybox.links: $(srctree)/applets/busybox.mkll $(objtree)/include/autoconf.h $(srctree)/include/applets.h $(Q)-$(SHELL) $^ >$@ @@ -15,6 +12,17 @@ endif ifeq ($(CONFIG_INSTALL_APPLET_HARDLINKS),y) INSTALL_OPTS:= --hardlinks endif +ifeq ($(CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS),y) +ifeq ($(CONFIG_INSTALL_SH_APPLET_SYMLINK),y) +INSTALL_OPTS:= --sw-sh-sym +endif +ifeq ($(CONFIG_INSTALL_SH_APPLET_HARDLINK),y) +INSTALL_OPTS:= --sw-sh-hard +endif +ifeq ($(CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER),y) +INSTALL_OPTS:= --scriptwrapper +endif +endif install: $(srctree)/applets/install.sh busybox busybox.links $(Q)DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \ $(SHELL) $< $(CONFIG_PREFIX) $(INSTALL_OPTS) @@ -38,15 +46,20 @@ ifneq ($(strip $(DO_INSTALL_LIBS)),n) done endif +# Not very elegant: copies testsuite to objdir... +# (cp -pPR is POSIX-compliant (cp -dpR or cp -a would not be)) +.PHONY: check +.PHONY: test check test: busybox busybox.links - bindir=$(objtree) srcdir=$(srctree)/testsuite SED="$(SED)" \ - $(SHELL) $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v) + test -d $(objtree)/testsuite || cp -pPR $(srctree)/testsuite $(objtree) + bindir=$(objtree) srcdir=$(srctree)/testsuite \ + $(SHELL) -c "cd $(objtree)/testsuite && $(srctree)/testsuite/runtest $(if $(KBUILD_VERBOSE:0=),-v)" .PHONY: release release: distclean cd ..; \ rm -r -f busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION); \ - cp -a busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ + cp -pPR busybox busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) && { \ find busybox-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)/ -type d \ -name .svn \ -print \ @@ -70,6 +83,7 @@ sizes: busybox_unstripped .PHONY: bloatcheck bloatcheck: busybox_old busybox_unstripped @$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped + @$(CROSS_COMPILE)size busybox_old busybox_unstripped .PHONY: baseline baseline: busybox_unstripped @@ -79,9 +93,13 @@ baseline: busybox_unstripped objsizes: busybox_unstripped $(srctree)/scripts/objsizes +.PHONY: stksizes +stksizes: busybox_unstripped + $(CROSS_COMPILE)objdump -d busybox_unstripped | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq + .PHONY: bigdata bigdata: busybox_unstripped - nm --size-sort busybox_unstripped | grep -vi ' [tr] ' | tail -20 + $(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [trw] ' # Documentation Targets .PHONY: doc @@ -143,3 +161,5 @@ SYN_CPPFLAGS := $(subst $(brace_close),\$(brace_close),$(SYN_CPPFLAGS)) .PHONY: html html: $(syn) synopsis -f HTML -Wf,title="'BusyBox Documentation'" -o $@ $^ + +-include $(srctree)/Makefile.local