···316 #arch/m68k/fpsp040/Makefile317 ldflags-y := -x3180000000000319 CFLAGS_$@, AFLAGS_$@320321 CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
···316 #arch/m68k/fpsp040/Makefile317 ldflags-y := -x318319+ subdir-ccflags-y, subdir-asflags-y320+ The two flags listed above are similar to ccflags-y and as-falgs-y.321+ The difference is that the subdir- variants has effect for the kbuild322+ file where tey are present and all subdirectories.323+ Options specified using subdir-* are added to the commandline before324+ the options specified using the non-subdir variants.325+326+ Example:327+ subdir-ccflags-y := -Werror328+329 CFLAGS_$@, AFLAGS_$@330331 CFLAGS_$@ and AFLAGS_$@ only apply to commands in current
···27cppflags-y :=28ldflags-y :=2900030# Read auto.conf if it exists, otherwise ignore31-include include/config/auto.conf32
···27cppflags-y :=28ldflags-y :=2930+subdir-asflags-y :=31+subdir-ccflags-y :=32+33# Read auto.conf if it exists, otherwise ignore34-include include/config/auto.conf35
+7-2
scripts/Makefile.lib
···4cppflags-y += $(EXTRA_CPPFLAGS)5ldflags-y += $(EXTRA_LDFLAGS)6000007# Figure out what we need to build from the various variables8# ===========================================================================9···109debug_flags =110endif111112-orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \113 $(ccflags-y) $(CFLAGS_$(basetarget).o)114_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))115-_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) \116 $(asflags-y) $(AFLAGS_$(basetarget).o)117_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))118
···4cppflags-y += $(EXTRA_CPPFLAGS)5ldflags-y += $(EXTRA_LDFLAGS)67+#8+# flags that take effect in sub directories9+export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y)10+export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y)11+12# Figure out what we need to build from the various variables13# ===========================================================================14···104debug_flags =105endif106107+orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \108 $(ccflags-y) $(CFLAGS_$(basetarget).o)109_c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))110+_a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \111 $(asflags-y) $(AFLAGS_$(basetarget).o)112_cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))113