aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index e48e60da3040..3cb445cc7432 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -8,7 +8,7 @@ PHONY := __build
8__build: 8__build:
9 9
10# Read .config if it exist, otherwise ignore 10# Read .config if it exist, otherwise ignore
11-include .config 11-include include/config/auto.conf
12 12
13include scripts/Kbuild.include 13include scripts/Kbuild.include
14 14
@@ -117,7 +117,7 @@ $(real-objs-m:.o=.lst): quiet_modtag := [M]
117$(obj-m) : quiet_modtag := [M] 117$(obj-m) : quiet_modtag := [M]
118 118
119# Default for not multi-part modules 119# Default for not multi-part modules
120modname = $(*F) 120modname = $(basetarget)
121 121
122$(multi-objs-m) : modname = $(modname-multi) 122$(multi-objs-m) : modname = $(modname-multi)
123$(multi-objs-m:.o=.i) : modname = $(modname-multi) 123$(multi-objs-m:.o=.i) : modname = $(modname-multi)
@@ -140,6 +140,15 @@ cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $<
140%.i: %.c FORCE 140%.i: %.c FORCE
141 $(call if_changed_dep,cc_i_c) 141 $(call if_changed_dep,cc_i_c)
142 142
143quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@
144cmd_cc_symtypes_c = \
145 $(CPP) -D__GENKSYMS__ $(c_flags) $< \
146 | $(GENKSYMS) -T $@ >/dev/null; \
147 test -s $@ || rm -f $@
148
149%.symtypes : %.c FORCE
150 $(call if_changed_dep,cc_symtypes_c)
151
143# C (.c) files 152# C (.c) files
144# The C file is compiled and updated dependency information is generated. 153# The C file is compiled and updated dependency information is generated.
145# (See cmd_cc_o_c + relevant part of rule_cc_o_c) 154# (See cmd_cc_o_c + relevant part of rule_cc_o_c)
@@ -166,7 +175,8 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
166cmd_modversions = \ 175cmd_modversions = \
167 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ 176 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
168 $(CPP) -D__GENKSYMS__ $(c_flags) $< \ 177 $(CPP) -D__GENKSYMS__ $(c_flags) $< \
169 | $(GENKSYMS) -a $(ARCH) \ 178 | $(GENKSYMS) $(if $(KBUILD_SYMTYPES), \
179 -T $(@D)/$(@F:.o=.symtypes)) -a $(ARCH) \
170 > $(@D)/.tmp_$(@F:.o=.ver); \ 180 > $(@D)/.tmp_$(@F:.o=.ver); \
171 \ 181 \
172 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 182 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \