diff options
author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-07-21 09:14:59 -0400 |
---|---|---|
committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-07-21 09:14:59 -0400 |
commit | 19d371cb403cc223eabe80e52a19beea04b42a84 (patch) | |
tree | 2ce2bbb29910ac8e5e4e00438e6532aabaef130f /Makefile | |
parent | 50692f8c6b6a27ffed9b5b7206ca6682a60ff354 (diff) | |
parent | c76282a0ef4661a4e57a5f1defa3cfbb5923588d (diff) | |
download | history-19d371cb403cc223eabe80e52a19beea04b42a84.tar.gz |
Hand merged
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 74 |
1 files changed, 46 insertions, 28 deletions
diff --git a/Makefile b/Makefile index 2bc170c087e4a5..dc229698981355 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ EXTRAVERSION = -test1 # *DOCUMENTATION* # To see a list of typical targets execute "make help" -# More info can be located in ./Documentation/kbuild +# More info can be located in ./README # Comments in this file are targeted only to the developer, do not # expect to learn how to build the kernel reading this file. @@ -112,22 +112,8 @@ endif export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE KBUILD_CHECKSRC -# Beautify output -# --------------------------------------------------------------------------- -# -# Normally, we echo the whole command before executing it. By making -# that echo $($(quiet)$(cmd)), we now have the possibility to set -# $(quiet) to choose other forms of output instead, e.g. -# -# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ -# 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 "silent_", nothing wil be printed at all, since -# the variable $(silent_cmd_cc_o_c) doesn't exist. - # To put more focus on warnings, less verbose as default +# Use 'make V=1' to see the full commands ifdef V ifeq ("$(origin V)", "command line") @@ -138,6 +124,9 @@ ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 0 endif +# Call sparse as part of compilation of C files +# Use 'make C=1' to enable sparse checking + ifdef C ifeq ("$(origin C)", "command line") KBUILD_CHECKSRC = $(C) @@ -147,6 +136,7 @@ ifndef KBUILD_CHECKSRC KBUILD_CHECKSRC = 0 endif +# Do not print 'Entering directory ...' MAKEFLAGS += --no-print-directory @@ -155,8 +145,28 @@ MAKEFLAGS += --no-print-directory #MAKEFLAGS += -rR -# If the user wants quiet mode, echo short versions of the commands -# only +# Beautify output +# --------------------------------------------------------------------------- +# +# Normally, we echo the whole command before executing it. By making +# that echo $($(quiet)$(cmd)), we now have the possibility to set +# $(quiet) to choose other forms of output instead, e.g. +# +# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ +# 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 "silent_", nothing wil be printed at all, since +# the variable $(silent_cmd_cc_o_c) doesn't exist. +# +# A simple variant is to prefix commands with $(Q) - that's usefull +# for commands that shall be hidden in non-verbose mode. +# +# $(Q)ln $@ :< +# +# If KBUILD_VERBOSE equals 0 then the above command will be hidden. +# If KBUILD_VERBOSE equals 1 then the above command is displayed. ifeq ($(KBUILD_VERBOSE),1) quiet = @@ -166,8 +176,8 @@ else Q = @ endif -# If the user is running make -s (silent mode), suppress echoing of -# commands +# If the user is running make -s (silent mode), suppress echoing of +# commands ifneq ($(findstring s,$(MAKEFLAGS)),) quiet=silent_ @@ -175,7 +185,7 @@ endif export quiet Q KBUILD_VERBOSE -# Paths to obj / src tree +# Paths to obj / src tree src := . obj := . @@ -184,7 +194,7 @@ objtree := . export srctree objtree -# Make variables (CC, etc...) +# Make variables (CC, etc...) AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld @@ -213,9 +223,9 @@ AFLAGS_KERNEL = NOSTDINC_FLAGS = -nostdinc -iwithprefix include CPPFLAGS := -D__KERNEL__ -Iinclude -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ +CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ -fno-strict-aliasing -fno-common -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) +AFLAGS := -D__ASSEMBLY__ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ @@ -236,7 +246,7 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d) noconfig_targets := xconfig gconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ clean mrproper distclean rpm \ - help tags TAGS cscope sgmldocs psdocs pdfdocs htmldocs \ + help tags TAGS cscope %docs \ checkconfig checkhelp checkincludes RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o @@ -271,6 +281,10 @@ endif include arch/$(ARCH)/Makefile +# Let architecture Makefiles change CPPFLAGS if needed +CFLAGS += $(CPPFLAGS) $(CFLAGS) +AFLAGS += $(CPPFLAGS) $(AFLAGS) + core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ @@ -308,6 +322,10 @@ ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif +ifdef CONFIG_DEBUG_INFO +CFLAGS += -g +endif + # # INSTALL_PATH specifies where to place the updated kernel and system map # images. Uncomment if you want to place them anywhere other than root. @@ -352,7 +370,7 @@ endef # set -e makes the rule exit immediately on error define rule_vmlinux__ - set -e; \ + +set -e; \ $(if $(filter .tmp_kallsyms%,$^),, \ echo ' GEN .version'; \ . $(srctree)/scripts/mkversion > .tmp_version; \ @@ -825,12 +843,12 @@ help: @echo ' make C=1 [targets] Check all c source with checker tool' @echo '' @echo 'Execute "make" or "make all" to build all targets marked with [*] ' - @echo 'For further info browse Documentation/kbuild/*' + @echo 'For further info see the ./README file' # Documentation targets # --------------------------------------------------------------------------- -sgmldocs psdocs pdfdocs htmldocs: scripts/docproc FORCE +%docs: scripts/docproc FORCE $(Q)$(MAKE) $(build)=Documentation/DocBook $@ # Scripts to check various things for consistency |