X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile;h=5b8cad8f6d0b3e51d2da8084a6aee40f40f0e8fd;hb=7b830e78f2ff2ba024ae713c306ab49aa45a435a;hp=78c701ec059f9cd9fefbc8c1acb17b944ca96b38;hpb=b8e653bfbfeee7797e631d6d47cd9cddb7658e4b;p=oweals%2Fbusybox.git diff --git a/Makefile b/Makefile index 78c701ec0..5b8cad8f6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION = 1 -PATCHLEVEL = 11 +PATCHLEVEL = 14 SUBLEVEL = 0 EXTRAVERSION = .svn NAME = Unnamed @@ -161,13 +161,14 @@ export srctree objtree VPATH TOPDIR # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile -CROSS_COMPILE ?= +CROSS_COMPILE ?= # bbox: we may have CONFIG_CROSS_COMPILER_PREFIX in .config, # and it has not been included yet... thus using an awkward syntax. ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := $(shell grep ^CONFIG_CROSS_COMPILER_PREFIX .config 2>/dev/null) CROSS_COMPILE := $(subst CONFIG_CROSS_COMPILER_PREFIX=,,$(CROSS_COMPILE)) CROSS_COMPILE := $(subst ",,$(CROSS_COMPILE)) +#") endif # SUBARCH tells the usermode build what the underlying arch is. That is set @@ -186,8 +187,7 @@ SUBARCH := $(shell echo $(SUBARCH) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ ) -ARCH ?= $(SUBARCH) -$(warning ARCH=$(ARCH) SUBARCH=$(SUBARCH)) +ARCH ?= $(SUBARCH) # Architecture as present in compile.h UTS_MACHINE := $(ARCH) @@ -316,6 +316,8 @@ AFLAGS_KERNEL = # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option CFLAGS := $(CFLAGS) +# Added only to final link stage of busybox binary +CFLAGS_busybox := $(CFLAGS_busybox) CPPFLAGS := $(CPPFLAGS) AFLAGS := $(AFLAGS) LDFLAGS := $(LDFLAGS) @@ -455,6 +457,7 @@ libs-y := \ libbb/ \ libpwdgrp/ \ loginutils/ \ + mailutils/ \ miscutils/ \ modutils/ \ networking/ \ @@ -504,7 +507,7 @@ endif # command line. # This allow a user to issue only 'make' to build a kernel including modules # Defaults busybox but it is usually overridden in the arch makefile -all: busybox +all: busybox doc -include $(srctree)/arch/$(ARCH)/Makefile @@ -581,7 +584,7 @@ quiet_cmd_busybox__ ?= LINK $@ cmd_busybox__ ?= $(srctree)/scripts/trylink \ "$@" \ "$(CC)" \ - "$(CFLAGS)" \ + "$(CFLAGS) $(CFLAGS_busybox)" \ "$(LDFLAGS) $(EXTRA_LDFLAGS)" \ "$(core-y)" \ "$(libs-y)" \ @@ -697,6 +700,8 @@ ifeq ($(SKIP_STRIP),y) else $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \ busybox_unstripped -o $@ +# strip is confused by PIE executable and does not set exec bits + $(Q)chmod a+x $@ endif # The actual objects are generated when descending, @@ -929,8 +934,9 @@ endif # CONFIG_MODULES # make distclean Remove editor backup files, patch leftover files and the like # Directories & files removed with 'make clean' -CLEAN_DIRS += $(MODVERDIR) -CLEAN_FILES += busybox* System.map .kernelrelease \ +CLEAN_DIRS += $(MODVERDIR) _install 0_lib +CLEAN_FILES += busybox busybox_unstripped* busybox.links \ + System.map .kernelrelease \ .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map # Directories & files removed with 'make mrproper' @@ -941,7 +947,8 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \ include/usage_compressed.h \ include/applet_tables.h \ applets/usage \ - .kernelrelease Module.symvers tags TAGS cscope* + .kernelrelease Module.symvers tags TAGS cscope* \ + busybox_old # clean - Delete most, but leave enough to build external modules # @@ -957,10 +964,16 @@ clean: archclean $(clean-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f +PHONY += doc-clean +doc-clean: rm-files := docs/busybox.pod \ + docs/BusyBox.html docs/BusyBox.1 docs/BusyBox.txt +doc-clean: + $(call cmd,rmfiles) + # mrproper - Delete all generated files, including .config # mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) @@ -981,9 +994,9 @@ PHONY += distclean distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \ + -o -name '.*.rej' -o -name '*.tmp' -o -size 0 \ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f @@ -1087,7 +1100,7 @@ clean: rm-dirs := $(MODVERDIR) clean: $(clean-dirs) $(call cmd,rmdirs) @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f