projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
runsvd: shrink by Vladimir
[oweals/busybox.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index aad67a1a814f3796469e6ae00adbbda133e74900..5d65467166fdfebd7b1af20af3d0dd61f7a19bb8 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,5
+1,5
@@
VERSION = 1
VERSION = 1
-PATCHLEVEL = 1
1
+PATCHLEVEL = 1
3
SUBLEVEL = 0
EXTRAVERSION = .svn
NAME = Unnamed
SUBLEVEL = 0
EXTRAVERSION = .svn
NAME = Unnamed
@@
-315,6
+315,8
@@
AFLAGS_KERNEL =
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
CFLAGS := $(CFLAGS)
# 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)
CPPFLAGS := $(CPPFLAGS)
AFLAGS := $(AFLAGS)
LDFLAGS := $(LDFLAGS)
@@
-503,7
+505,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
# 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
-include $(srctree)/arch/$(ARCH)/Makefile
@@
-580,7
+582,7
@@
quiet_cmd_busybox__ ?= LINK $@
cmd_busybox__ ?= $(srctree)/scripts/trylink \
"$@" \
"$(CC)" \
cmd_busybox__ ?= $(srctree)/scripts/trylink \
"$@" \
"$(CC)" \
- "$(CFLAGS)" \
+ "$(CFLAGS)
$(CFLAGS_busybox)
" \
"$(LDFLAGS) $(EXTRA_LDFLAGS)" \
"$(core-y)" \
"$(libs-y)" \
"$(LDFLAGS) $(EXTRA_LDFLAGS)" \
"$(core-y)" \
"$(libs-y)" \
@@
-696,6
+698,8
@@
ifeq ($(SKIP_STRIP),y)
else
$(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
busybox_unstripped -o $@
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,
endif
# The actual objects are generated when descending,
@@
-928,8
+932,9
@@
endif # CONFIG_MODULES
# make distclean Remove editor backup files, patch leftover files and the like
# Directories & files removed with 'make clean'
# 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'
.tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map
# Directories & files removed with 'make mrproper'
@@
-940,7
+945,8
@@
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/usage_compressed.h \
include/applet_tables.h \
applets/usage \
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
#
# clean - Delete most, but leave enough to build external modules
#
@@
-956,10
+962,16
@@
clean: archclean $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find . $(RCS_FIND_IGNORE) \
$(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
-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))
# mrproper - Delete all generated files, including .config
#
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
@@
-980,9
+992,9
@@
PHONY += distclean
distclean: mrproper
@find $(srctree) $(RCS_FIND_IGNORE) \
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 '*.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
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-type f -print | xargs rm -f
@@
-1086,7
+1098,7
@@
clean: rm-dirs := $(MODVERDIR)
clean: $(clean-dirs)
$(call cmd,rmdirs)
@find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
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
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
-type f -print | xargs rm -f