VERSION = 1
PATCHLEVEL = 2
-SUBLEVEL = 1
+SUBLEVEL = 2
EXTRAVERSION = .svn
-NAME=Unnamed
+NAME = Unnamed
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
MAKEFLAGS += --include-dir=$(srctree)
# We need some generic definitions
-include $(srctree)/scripts/Kbuild.include
+include $(srctree)/scripts/Kbuild.include
# For maximum performance (+ possibly random breakage, uncomment
# the following)
CFLAGS :=
CPPFLAGS :=
AFLAGS :=
-include $(srctree)/Makefile.flags
# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
- $(Q)mkdir -p include/linux
+ $(Q)mkdir -p include
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
# To avoid any implicit rule to kick in, define an empty command
.config .kconfig.d: ;
+# Now we can define CFLAGS etc according to .config
+include $(srctree)/Makefile.flags
+
# If .config is newer than include/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig.
# If kconfig.d is missing then we are probarly in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/autoconf.h: .kconfig.d .config
- $(Q)mkdir -p include/linux
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
# 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) \
+ -static \
+ -o $@ \
+ -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
+ -Wl,--start-group $(busybox-all) -Wl,--end-group
+else
cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ \
-Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
- -Wl,--start-group $(busybox-all) -Wl,--end-group \
+ -Wl,--start-group $(busybox-all) -Wl,--end-group
+endif
# Generate System.map
quiet_cmd_sysmap = SYSMAP
$(Q)rm -f .old_version
busybox: busybox_unstripped
- $(Q)strip -s --remove-section=.note --remove-section=.comment \
+ $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
busybox_unstripped -o $@
# The actual objects are generated when descending,
@scripts/basic/split-include include/autoconf.h include/config
@echo ' GEN include/bbconfigopts.h'
@$(srctree)/scripts/mkconfigs >include/bbconfigopts.h
- @$(MAKE) $(build)=scripts
- @echo ' GEN include/usage_compressed.h'
- @$(srctree)/scripts/usage_compressed include/usage_compressed.h scripts
@touch $@
# Generate some files
boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
--include Makefile.help
+-include $(srctree)/Makefile.help
# Documentation targets
# ---------------------------------------------------------------------------
PHONY += FORCE
FORCE:
--include Makefile.custom
+-include $(srctree)/Makefile.custom
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable se we can use it in if_changed and friends.