Lines Matching +full:multi +full:-
1 # SPDX-License-Identifier: GPL-2.0
6 …$(CONFIG_SHELL) $(srctree)/$(src)/gen-random-seed.sh $@ $(objtree)/include/generated/randomize_lay…
13 # No extra code is needed for single-file plugins.
14 # For multi-file plugins, use *-objs syntax to list the objects.
18 # foo-objs := foo.o foo2.o
20 always-y += $(GCC_PLUGIN)
22 GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
24 plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
25 -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++98 \
26 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
27 -ggdb -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat \
28 -Wno-format-diag
30 plugin_ldflags = -shared
32 plugin-single := $(foreach m, $(GCC_PLUGIN), $(if $($(m:%.so=%-objs)),,$(m)))
33 plugin-multi := $(filter-out $(plugin-single), $(GCC_PLUGIN))
34 plugin-objs := $(sort $(foreach m, $(plugin-multi), $($(m:%.so=%-objs))))
36 targets += $(plugin-single) $(plugin-multi) $(plugin-objs)
37 clean-files += *.so
39 plugin-single := $(addprefix $(obj)/, $(plugin-single))
40 plugin-multi := $(addprefix $(obj)/, $(plugin-multi))
41 plugin-objs := $(addprefix $(obj)/, $(plugin-objs))
44 cmd_plugin_cxx_so_c = $(HOSTCXX) $(plugin_cxxflags) $(plugin_ldflags) -o $@ $<
46 $(plugin-single): $(obj)/%.so: $(src)/%.c FORCE
50 cmd_plugin_ld_so_o = $(HOSTCXX) $(plugin_ldflags) -o $@ \
51 $(addprefix $(obj)/, $($(target-stem)-objs))
53 $(plugin-multi): FORCE
55 $(foreach m, $(notdir $(plugin-multi)), $(eval $(obj)/$m: $(addprefix $(obj)/, $($(m:%.so=%-objs)))…
58 cmd_plugin_cxx_o_c = $(HOSTCXX) $(plugin_cxxflags) -c -o $@ $<
60 $(plugin-objs): $(obj)/%.o: $(src)/%.c FORCE