kbuild: move asm-offsets.h rules to ./Kbuild
Generate include/generated/generic-asm-offsets.h and
include/generated/asm-offsets.h in ./Kbuild.
This commit also changes the include guard.
Before this commit, __ASM_OFFSETS_H__ was used for both of them.
So we could not include generic-asm-offsets.h and asm-offsets.h
at the same time.
This commit renames the include guard of the former to
__GENERIC_ASM_OFFSETS_H__.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/Makefile b/Makefile
index aef936d..14dff8f 100644
--- a/Makefile
+++ b/Makefile
@@ -988,9 +988,8 @@
archprepare: prepare1 scripts_basic
-prepare0: archprepare FORCE include/generated/generic-asm-offsets.h \
- include/generated/asm-offsets.h
- @:
+prepare0: archprepare FORCE
+ $(Q)$(MAKE) $(build)=.
# All the preparing..
prepare: prepare0
@@ -1115,37 +1114,6 @@
false; \
fi
-quiet_cmd_offsets = GEN $@
- cmd_offsets = $(srctree)/tools/scripts/make-asm-offsets $< $@
-
-include/generated/generic-asm-offsets.h: lib/asm-offsets.s
- $(call cmd,offsets)
-
-quiet_cmd_asm-offsets.s = CC $@
- cmd_asm-offsets.s = mkdir -p lib; \
- $(CC) -DDO_DEPS_ONLY \
- $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
- -o $@ $< -c -S
-
-lib/asm-offsets.s: $(srctree)/lib/asm-offsets.c include/config.h
- $(call cmd,asm-offsets.s)
-
-include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s
- $(call cmd,offsets)
-
-quiet_cmd_soc_asm-offsets.s = CC $@
- cmd_soc_asm-offsets.s = mkdir -p $(CPUDIR)/$(SOC); \
- if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
- $(CC) -DDO_DEPS_ONLY \
- $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
- -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \
- else \
- touch $@; \
- fi
-
-$(CPUDIR)/$(SOC)/asm-offsets.s: include/config.h
- $(call cmd,soc_asm-offsets.s)
-
#########################################################################
# ARM relocations should all be R_ARM_RELATIVE (32-bit) or