Lines Matching +full:multi +full:- +full:line
2 asflags-y += $(EXTRA_AFLAGS)
3 ccflags-y += $(EXTRA_CFLAGS)
4 cppflags-y += $(EXTRA_CPPFLAGS)
5 ldflags-y += $(EXTRA_LDFLAGS)
9 export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y)
10 export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y)
15 # When an object is listed to be built compiled-in and modular,
16 # only build the compiled-in version
18 obj-m := $(filter-out $(obj-y),$(obj-m))
21 # Filter out objects already built-in
23 lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m)))
27 # ---------------------------------------------------------------------------
28 # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o
29 # and add the directory to the list of dirs to descend into: $(subdir-y)
30 # o if we encounter foo/ in $(obj-m), remove it from $(obj-m)
31 # and add the directory to the list of dirs to descend into: $(subdir-m)
34 # Unfortunately, we don't have information about ordering between -y
35 # and -m subdirs. Just put -y's first.
36 modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko))
38 __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y)))
39 subdir-y += $(__subdir-y)
40 __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m)))
41 subdir-m += $(__subdir-m)
42 obj-y := $(patsubst %/, %/built-in.o, $(obj-y))
43 obj-m := $(filter-out %/, $(obj-m))
47 subdir-ym := $(sort $(subdir-y) $(subdir-m))
49 # if $(foo-objs) exists, foo.o is a composite object
50 multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
51 multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
52 multi-used := $(multi-used-y) $(multi-used-m)
53 single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m)))
57 multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
58 multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
59 multi-objs := $(multi-objs-y) $(multi-objs-m)
61 # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
63 subdir-obj-y := $(filter %/built-in.o, $(obj-y))
65 # $(obj-dirs) is a list of directories that contain object files
66 obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
68 # Replace multi-part objects by their individual parts, look at local dir only
69 …-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($…
70 real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs))…
74 extra-y := $(addprefix $(obj)/,$(extra-y))
78 obj-y := $(addprefix $(obj)/,$(obj-y))
79 obj-m := $(addprefix $(obj)/,$(obj-m))
80 lib-y := $(addprefix $(obj)/,$(lib-y))
81 subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y))
82 real-objs-y := $(addprefix $(obj)/,$(real-objs-y))
83 real-objs-m := $(addprefix $(obj)/,$(real-objs-m))
84 single-used-m := $(addprefix $(obj)/,$(single-used-m))
85 multi-used-y := $(addprefix $(obj)/,$(multi-used-y))
86 multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
87 multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
88 multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
89 subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
90 obj-dirs := $(addprefix $(obj)/,$(obj-dirs))
97 # KBUILD_MODNAME definition. The reason is that any made-up name would
99 name-fix = $(subst $(comma),_,$(subst -,_,$1))
100 basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
102 -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
105 $(ccflags-y) $(CFLAGS_$(basetarget).o)
106 _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags))
108 $(asflags-y) $(AFLAGS_$(basetarget).o)
109 _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F))
123 _sym_flags = -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))
130 # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
138 # -I$(obj) locates generated .h files
139 # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files
142 __c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags)
147 c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
149 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
151 a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
154 cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
157 ld_flags = $(LDFLAGS) $(ldflags-y)
159 # Finds the multi-part object the current object will be linked into
160 modname-multi = $(sort $(foreach m,$(multi-used),\
161 $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
166 # ---------------------------------------------------------------------------
168 cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
175 # ---------------------------------------------------------------------------
179 cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $<
186 # ---------------------------------------------------------------------------
190 cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $<
197 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
222 # and add target to extra-y so that we know we have to
223 # read in the saved command line
226 # ---------------------------------------------------------------------------
229 cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \
230 $(filter-out FORCE,$^) -o $@
233 # ---------------------------------------------------------------------------
239 # ---------------------------------------------------------------------------
242 cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
243 (rm -f $@ ; false)
246 # ---------------------------------------------------------------------------
252 echo '\#include <asm-generic/vmlinux.lds.h>'; \
267 cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $<
270 # ---------------------------------------------------------------------------
273 # append the size as a 32-bit littleendian number as gzip does.
277 fsize=$$(stat -c "%s" $$F); \
290 cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
291 bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
292 (rm -f $@ ; false)
295 # ---------------------------------------------------------------------------
298 cmd_lzma = (cat $(filter-out FORCE,$^) | \
299 lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
300 (rm -f $@ ; false)
303 cmd_lzo = (cat $(filter-out FORCE,$^) | \
304 lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
305 (rm -f $@ ; false)
308 # ---------------------------------------------------------------------------
322 # big dictionary would increase the memory usage too much in the multi-call
325 cmd_xzkern = (cat $(filter-out FORCE,$^) | \
327 $(call size_append, $(filter-out FORCE,$^))) > $@ || \
328 (rm -f $@ ; false)
331 cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
332 xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
333 (rm -f $@ ; false)
336 # ---------------------------------------------------------------------------