projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logger: fix a problem of losing all argv except first
[oweals/busybox.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 580a559a4312597f51c25c0a8c722b09d8a4ede6..2dced88e443b97bd734dca27c9274011d91b52fd 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,5
+1,5
@@
VERSION = 1
VERSION = 1
-PATCHLEVEL =
4
+PATCHLEVEL =
8
SUBLEVEL = 0
EXTRAVERSION = .svn
NAME = Unnamed
SUBLEVEL = 0
EXTRAVERSION = .svn
NAME = Unnamed
@@
-71,7
+71,7
@@
endif
# In both cases the working directory must be the root of the kernel src.
# 1) O=
# Use "make O=dir/to/store/output/files/"
# In both cases the working directory must be the root of the kernel src.
# 1) O=
# Use "make O=dir/to/store/output/files/"
-#
+#
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the directory
# where the output files shall be placed.
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the directory
# where the output files shall be placed.
@@
-145,7
+145,7
@@
export srctree objtree VPATH TOPDIR
# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
# line overrides the setting of ARCH below. If a native build is happening,
# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
# line overrides the setting of ARCH below. If a native build is happening,
-# then ARCH is assigned, getting whatever value it gets normally, and
+# then ARCH is assigned, getting whatever value it gets normally, and
# SUBARCH is subsequently ignored.
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
# SUBARCH is subsequently ignored.
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
@@
-183,11
+183,6
@@
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-HOSTCC = gcc
-HOSTCXX = g++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTCXXFLAGS = -O2
-
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
@@
-229,7
+224,7
@@
export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
-# If it is set to "quiet_", only the short version will be printed.
+# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing wil be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# If it is set to "silent_", nothing wil be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
@@
-262,9
+257,16
@@
export quiet Q KBUILD_VERBOSE
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
+HOSTCC = gcc
+HOSTCXX = g++
+HOSTCFLAGS :=
+HOSTCXXFLAGS :=
# We need some generic definitions
include $(srctree)/scripts/Kbuild.include
# We need some generic definitions
include $(srctree)/scripts/Kbuild.include
+HOSTCFLAGS += $(call hostcc-option,-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer,)
+HOSTCXXFLAGS += -O2
+
# For maximum performance (+ possibly random breakage, uncomment
# the following)
# For maximum performance (+ possibly random breakage, uncomment
# the following)
@@
-273,8
+275,8
@@
MAKEFLAGS += -rR
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)gcc -nostdlib
CC = $(CROSS_COMPILE)gcc
CC = $(CROSS_COMPILE)gcc
+LD = $(CC) -nostdlib
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
@@
-299,9
+301,11
@@
AFLAGS_KERNEL =
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
-CFLAGS :=
-CPPFLAGS :=
-AFLAGS :=
+CFLAGS := $(CFLAGS)
+CPPFLAGS := $(CPPFLAGS)
+AFLAGS := $(AFLAGS)
+LDFLAGS := $(LDFLAGS)
+LDLIBS :=
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
@@
-313,8
+317,9
@@
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
-export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
+export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
+export FLTFLAGS
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
@@
-351,7
+356,7
@@
endif
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
-# For example 'make oldconfig all'.
+# For example 'make oldconfig all'.
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
@@
-432,6
+437,7
@@
libs-y := \
editors/ \
findutils/ \
init/ \
editors/ \
findutils/ \
init/ \
+ ipsvd/ \
libbb/ \
libpwdgrp/ \
loginutils/ \
libbb/ \
libpwdgrp/ \
loginutils/ \
@@
-442,6
+448,7
@@
libs-y := \
networking/udhcp/ \
procps/ \
runit/ \
networking/udhcp/ \
procps/ \
runit/ \
+ selinux/ \
shell/ \
sysklogd/ \
util-linux/ \
shell/ \
sysklogd/ \
util-linux/ \
@@
-480,7
+487,7
@@
endif
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
-# Defaults busybox but it is usually overriden in the arch makefile
+# Defaults busybox but it is usually overrid
d
en in the arch makefile
all: busybox
-include $(srctree)/arch/$(ARCH)/Makefile
all: busybox
-include $(srctree)/arch/$(ARCH)/Makefile
@@
-529,7
+536,6
@@
libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2)
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2)
-
# Build busybox
# ---------------------------------------------------------------------------
# busybox is build from the objects selected by $(busybox-init) and
# Build busybox
# ---------------------------------------------------------------------------
# busybox is build from the objects selected by $(busybox-init) and
@@
-562,21
+568,14
@@
busybox-all := $(core-y) $(libs-y)
# Rule to link busybox - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_busybox__ ?= LINK $@
# Rule to link busybox - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_busybox__ ?= LINK $@
-ifdef CONFIG_STATIC
- cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
- -static \
- -o $@ \
+ cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) \
+ -o $@ -Wl,-Map -Wl,$@.map \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group
-else
- cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
- -o $@ \
- -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group
-endif
+ -Wl,--start-group $(busybox-all) -Wl,--end-group \
+ $(LDLIBS)
# Generate System.map
# Generate System.map
-quiet_cmd_sysmap = SYSMAP
+quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
# Link of busybox
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
# Link of busybox
@@
-632,7
+631,7
@@
endef
# First command is ':' to allow us to use + in front of this rule
cmd_ksym_ld = $(cmd_busybox__)
define rule_ksym_ld
# First command is ':' to allow us to use + in front of this rule
cmd_ksym_ld = $(cmd_busybox__)
define rule_ksym_ld
- :
+ :
+$(call cmd,busybox_version)
$(call cmd,busybox__)
$(Q)echo 'cmd_$@ := $(cmd_busybox__)' > $(@D)/.$(@F).cmd
+$(call cmd,busybox_version)
$(call cmd,busybox__)
$(Q)echo 'cmd_$@ := $(cmd_busybox__)' > $(@D)/.$(@F).cmd
@@
-680,10
+679,14
@@
busybox_unstripped: $(busybox-all) FORCE
$(Q)rm -f .old_version
busybox: busybox_unstripped
$(Q)rm -f .old_version
busybox: busybox_unstripped
+ifeq ($(SKIP_STRIP),y)
+ $(Q)cp $< $@
+else
$(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
busybox_unstripped -o $@
$(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
busybox_unstripped -o $@
+endif
-# The actual objects are generated when descending,
+# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(busybox-all)): $(busybox-dirs) ;
# make sure no implicit rule kicks in
$(sort $(busybox-all)): $(busybox-dirs) ;
@@
-716,7
+719,7
@@
_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
localver = $(subst $(space),, \
$(shell cat /dev/null $(_localver)) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
localver = $(subst $(space),, \
$(shell cat /dev/null $(_localver)) \
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
-
+
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
# and if the SCM is know a tag from the SCM is appended.
# The appended tag is determinded by the SCM used.
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
# and if the SCM is know a tag from the SCM is appended.
# The appended tag is determinded by the SCM used.
@@
-757,7
+760,7
@@
PHONY += prepare-all
# 2) Create the include2 directory, used for the second asm symlink
prepare3: .kernelrelease
ifneq ($(KBUILD_SRC),)
# 2) Create the include2 directory, used for the second asm symlink
prepare3: .kernelrelease
ifneq ($(KBUILD_SRC),)
- @echo ' Using $(srctree) as source for
kernel
'
+ @echo ' Using $(srctree) as source for
busybox
'
$(Q)if [ -f $(srctree)/.config ]; then \
echo " $(srctree) is not clean, please run 'make mrproper'";\
echo " in the '$(srctree)' directory.";\
$(Q)if [ -f $(srctree)/.config ]; then \
echo " $(srctree) is not clean, please run 'make mrproper'";\
echo " in the '$(srctree)' directory.";\
@@
-799,12
+802,14
@@
export CPPFLAGS_busybox.lds += -P -C -U$(ARCH)
#bbox# @ln -fsn asm-$(ARCH) $@
# Split autoconf.h into include/linux/config/*
#bbox# @ln -fsn asm-$(ARCH) $@
# Split autoconf.h into include/linux/config/*
+quiet_cmd_gen_bbconfigopts = GEN include/bbconfigopts.h
+ cmd_gen_bbconfigopts = $(srctree)/scripts/mkconfigs > include/bbconfigopts.h
+quiet_cmd_split_autoconf = SPLIT include/autoconf.h -> include/config/*
+ cmd_split_autoconf = scripts/basic/split-include include/autoconf.h include/config
#bbox# piggybacked generation of few .h files
include/config/MARKER: scripts/basic/split-include include/autoconf.h
#bbox# piggybacked generation of few .h files
include/config/MARKER: scripts/basic/split-include include/autoconf.h
- @echo ' SPLIT include/autoconf.h -> include/config/*'
- @scripts/basic/split-include include/autoconf.h include/config
- @echo ' GEN include/bbconfigopts.h'
- @$(srctree)/scripts/mkconfigs >include/bbconfigopts.h
+ $(call cmd,split_autoconf)
+ $(call cmd,gen_bbconfigopts)
@touch $@
# Generate some files
@touch $@
# Generate some files
@@
-912,7
+917,7
@@
endif # CONFIG_MODULES
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
-CLEAN_FILES += busybox* System.map \
+CLEAN_FILES += busybox* 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'
@@
-1242,7
+1247,7
@@
endif
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
-# FIXME Should go into a make.lib or something
+# FIXME Should go into a make.lib or something
# ===========================================================================
quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))
# ===========================================================================
quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))