Commit 96c0a918 authored by Masahiro Yamada's avatar Masahiro Yamada

kbuild: refactor part-of-module

Use $(foreach ...) to make it shorter.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 45c4372d
...@@ -94,17 +94,15 @@ endif ...@@ -94,17 +94,15 @@ endif
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Default is built-in, unless we know otherwise # Default is built-in, unless we know otherwise
$(foreach x, i lst o s, $(patsubst %.o,%.$(x),$(real-obj-m))): \
part-of-module := y
modkern_cflags = \ modkern_cflags = \
$(if $(part-of-module), \ $(if $(part-of-module), \
$(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \
$(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL))
quiet_modtag = $(if $(part-of-module),[M], ) quiet_modtag = $(if $(part-of-module),[M], )
$(real-obj-m) : part-of-module := y
$(real-obj-m:.o=.i) : part-of-module := y
$(real-obj-m:.o=.s) : part-of-module := y
$(real-obj-m:.o=.lst): part-of-module := y
quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment