aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 14:23:06 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 14:23:06 -0400
commit821f3eff7cdb9d6c7076effabd46c96c322daed1 (patch)
tree60f13155196fd6c84424c8aebc133ca4a5f56749 /scripts/Makefile.build
parentebc283118ee448dcb6e6cae74a8a43f17a1ccc3f (diff)
parentf77bf01425b11947eeb3b5b54685212c302741b8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: introduce ccflags-y, asflags-y and ldflags-y kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP kbuild: enable use of AFLAGS and CFLAGS on commandline kbuild: enable 'make AFLAGS=...' to add additional options to AS kbuild: fix AFLAGS use in h8300 and m68knommu kbuild: check for wrong use of CFLAGS kbuild: enable 'make CFLAGS=...' to add additional options to CC kbuild: fix up CFLAGS usage kbuild: make modpost detect unterminated device id lists kbuild: call export_report from the Makefile kbuild: move Kai Germaschewski to CREDITS kconfig/menuconfig: distinguish between selected-by-another options and comments kconfig: tristate choices with mixed tristate and boolean values include/linux/Kbuild: remove duplicate entries kbuild: kill backward compatibility checks kbuild: kill EXTRA_ARFLAGS kbuild: fix documentation in makefiles.txt kbuild: call make once for all targets when O=.. is used kbuild: pass -g to assembler under CONFIG_DEBUG_INFO kbuild: update _shipped files for kconfig syntax cleanup ... Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build45
1 files changed, 17 insertions, 28 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 7fd6055bedfd..de9836eee8bb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -22,16 +22,30 @@ EXTRA_AFLAGS :=
22EXTRA_CFLAGS := 22EXTRA_CFLAGS :=
23EXTRA_CPPFLAGS := 23EXTRA_CPPFLAGS :=
24EXTRA_LDFLAGS := 24EXTRA_LDFLAGS :=
25asflags-y :=
26ccflags-y :=
27cppflags-y :=
28ldflags-y :=
25 29
26# Read .config if it exist, otherwise ignore 30# Read .config if it exist, otherwise ignore
27-include include/config/auto.conf 31-include include/config/auto.conf
28 32
29include scripts/Kbuild.include 33include scripts/Kbuild.include
30 34
35# For backward compatibility check that these variables does not change
36save-cflags := $(CFLAGS)
37
31# The filename Kbuild has precedence over Makefile 38# The filename Kbuild has precedence over Makefile
32kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 39kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
33include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) 40kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
34 41include $(kbuild-file)
42
43# If the save-* variables changed error out
44ifeq ($(KBUILD_NOPEDANTIC),)
45 ifneq ("$(save-cflags)","$(CFLAGS)")
46 $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS)
47 endif
48endif
35include scripts/Makefile.lib 49include scripts/Makefile.lib
36 50
37ifdef host-progs 51ifdef host-progs
@@ -55,31 +69,6 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
55_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) 69_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
56endif 70endif
57 71
58
59ifdef EXTRA_TARGETS
60$(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!)
61endif
62
63ifdef build-targets
64$(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.6. Please fix!)
65endif
66
67ifdef export-objs
68$(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.6. Please fix!)
69endif
70
71ifdef O_TARGET
72$(warning kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.6. Please fix!)
73endif
74
75ifdef L_TARGET
76$(error kbuild: $(obj)/Makefile - Use of L_TARGET is replaced by lib-y in 2.6. Please fix!)
77endif
78
79ifdef list-multi
80$(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.6. Please fix!)
81endif
82
83ifndef obj 72ifndef obj
84$(warning kbuild: Makefile.build is included improperly) 73$(warning kbuild: Makefile.build is included improperly)
85endif 74endif
@@ -291,7 +280,7 @@ endif # builtin-target
291# 280#
292ifdef lib-target 281ifdef lib-target
293quiet_cmd_link_l_target = AR $@ 282quiet_cmd_link_l_target = AR $@
294cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-y) 283cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y)
295 284
296$(lib-target): $(lib-y) FORCE 285$(lib-target): $(lib-y) FORCE
297 $(call if_changed,link_l_target) 286 $(call if_changed,link_l_target)