summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@penguin.transmeta.com>2002-12-03 22:08:48 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-12-03 22:08:48 -0800
commit2becf2fd04bdad4a7d0acb94fef355a0b3febfdb (patch)
treee6b22859c6c9ac2dfe8315bb0be028fd50871147 /scripts/Makefile.lib
parent7b66a268acb1e7e7e1a367e3b07aa657cb198b2d (diff)
parent260b4179e57d412d7ed71cb5350775bf650ef7c6 (diff)
Merge http://linux-isdn.bkbits.net/linux-2.5.make
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index c8e1528aae55..f21c0905c2da 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -43,6 +43,7 @@ __obj-m = $(filter-out export.o,$(obj-m))
multi-used-y := $(sort $(foreach m,$(__obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
multi-used-m := $(sort $(foreach m,$(__obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
multi-used := $(multi-used-y) $(multi-used-m)
+single-used-m := $(filter-out $(multi-used-m),$(obj-m))
# Build list of the parts of our composite objects, our composite
# objects depend on those (obviously)
@@ -92,12 +93,14 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
# Add subdir path
EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS))
+build-targets := $(addprefix $(obj)/,$(build-targets))
obj-y := $(addprefix $(obj)/,$(obj-y))
obj-m := $(addprefix $(obj)/,$(obj-m))
export-objs := $(addprefix $(obj)/,$(export-objs))
subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
+single-used-m := $(addprefix $(obj)/,$(single-used-m))
multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
@@ -128,6 +131,12 @@ modname_flags = $(if $(filter 1,$(words $(modname))),-DKBUILD_MODNAME=$(subst $
c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
$(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
$(basename_flags) $(modname_flags) $(export_flags)
+a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS)\
+ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+hostc_flags = -Wp,-MD,$(depfile) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS)\
+ $(HOSTCFLAGS_$(*F).o)
+hostcxx_flags = -Wp,-MD,$(depfile) $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS)\
+ $(HOSTCXXFLAGS_$(*F).o)
# Finds the multi-part object the current object will be linked into
modname-multi = $(sort $(foreach m,$(multi-used),\
@@ -139,7 +148,7 @@ modname-multi = $(sort $(foreach m,$(multi-used),\
quiet_cmd_shipped = SHIPPED $@
cmd_shipped = cat $< > $@
-%:: %_shipped
+$(obj)/%:: $(src)/%_shipped
$(call cmd,shipped)
# Commands useful for building a boot image
@@ -236,4 +245,4 @@ endef
# $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target>
-descend = $(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)
+descend =$(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)