X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=scripts%2FMakefile.build;h=3b8c9d8c3190aa2ddc378ba27b7a555c765d7a4f;hb=10f6e4dc3a16c21f235416f975ecf2070ceb351f;hp=7e59ca54cd00d6841a8bb939f97b07684a47f458;hpb=27c6d9663c3f42059514e47c17652304a1cfcfc9;p=platform%2Fkernel%2Fu-boot.git diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7e59ca5..3b8c9d8 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -4,6 +4,9 @@ # ========================================================================== # Modified for U-Boot +prefix := vpl +src := $(patsubst $(prefix)/%,%,$(obj)) +ifeq ($(obj),$(src)) prefix := tpl src := $(patsubst $(prefix)/%,%,$(obj)) ifeq ($(obj),$(src)) @@ -13,6 +16,7 @@ ifeq ($(obj),$(src)) prefix := . endif endif +endif PHONY := __build __build: @@ -48,9 +52,6 @@ include scripts/Makefile.uncmd_spl include scripts/Kbuild.include -# For backward compatibility check that these variables do not change -save-cflags := $(CFLAGS) - # The filename Kbuild has precedence over Makefile kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) @@ -61,13 +62,6 @@ asflags-y += $(PLATFORM_CPPFLAGS) ccflags-y += $(PLATFORM_CPPFLAGS) cppflags-y += $(PLATFORM_CPPFLAGS) -# If the save-* variables changed error out -ifeq ($(KBUILD_NOPEDANTIC),) - ifneq ("$(save-cflags)","$(CFLAGS)") - $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y) - endif -endif - include scripts/Makefile.lib # Do not include host rules unless needed @@ -99,14 +93,12 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ @: # Linus' kernel sanity checking tool -ifneq ($(KBUILD_CHECKSRC),0) - ifeq ($(KBUILD_CHECKSRC),2) - quiet_cmd_force_checksrc = CHECK $< - cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; - else - quiet_cmd_checksrc = CHECK $< - cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; - endif +ifeq ($(KBUILD_CHECKSRC),1) + quiet_cmd_checksrc = CHECK $< + cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; +else ifeq ($(KBUILD_CHECKSRC),2) + quiet_cmd_force_checksrc = CHECK $< + cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; endif # Do section mismatch analysis for each module/built-in.o @@ -369,21 +361,8 @@ $(lib-target): $(lib-y) FORCE targets += $(lib-target) endif -# -# Rule to link composite objects -# -# Composite objects are specified in kbuild makefile as follows: -# -objs := -# or -# -y := -link_multi_deps = \ -$(filter $(addprefix $(obj)/, \ -$($(subst $(obj)/,,$(@:.o=-objs))) \ -$($(subst $(obj)/,,$(@:.o=-y)))), $^) - - quiet_cmd_link_multi-y = AR $@ -cmd_link_multi-y = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(link_multi_deps) +cmd_link_multi-y = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) quiet_cmd_link_multi-m = AR [M] $@ cmd_link_multi-m = $(cmd_link_multi-y) @@ -394,7 +373,7 @@ $(call multi_depend, $(multi-used-y), .o, -objs -y) $(multi-used-m): FORCE $(call if_changed,link_multi-m) - @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) + @{ echo $(@:.o=.ko); echo $(filter %.o,$^); } > $(MODVERDIR)/$(@F:.o=.mod) $(call multi_depend, $(multi-used-m), .o, -objs -y) targets += $(multi-used-y) $(multi-used-m)