build: Add targets for auto gen of asm-offsets.h and use it in imx35
authorMatthias Weisser <weisserm@arcor.de>
Thu, 30 Jun 2011 05:24:11 +0000 (05:24 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 14 Jul 2011 13:41:24 +0000 (15:41 +0200)
asm-offsets.h should be auto generated. This patch adds two rules to rules.mk
which makes this possible and removes the rules on imx35.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Acked-by: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/arm1136/mx35/Makefile
rules.mk

index 20f36e3e0ed80fbaa19bee5a07cfbacaf629aa38..284cdc50d175cae7d7234afc4e45a49729125a71 100644 (file)
@@ -50,14 +50,3 @@ include $(SRCTREE)/rules.mk
 sinclude $(obj).depend
 
 #########################################################################
-
-$(TOPDIR)/include/asm/arch/asm-offsets.h:      $(TOPDIR)/include/autoconf.mk.dep \
-       ./asm-offsets.s
-       @echo Generating $@
-       $(TOPDIR)/tools/scripts/make-asm-offsets ./asm-offsets.s $@
-
-asm-offsets.s: $(TOPDIR)/include/autoconf.mk.dep \
-       ./asm-offsets.c
-       $(CC) -DDO_DEPS_ONLY \
-               $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
-               -o $@ ./asm-offsets.c -c -S
index c2860e52afb08bf2f0de5d412f9d707749f44ba0..5fd12a027df3ceebda011265a2a1cc0632dc5695 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -42,4 +42,14 @@ $(HOSTOBJS): $(obj)%.o: %.c
 $(NOPEDOBJS): $(obj)%.o: %.c
        $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
+$(TOPDIR)/include/asm/arch/asm-offsets.h:      $(TOPDIR)/include/autoconf.mk.dep \
+       $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s
+       @echo Generating $@
+       $(TOPDIR)/tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@
+
+$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s:      $(TOPDIR)/include/autoconf.mk.dep \
+       $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c
+       $(CC) -DDO_DEPS_ONLY \
+               $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+               -o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S
 #########################################################################