summaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authorMatthias Weisser <weisserm@arcor.de>2011-06-30 05:24:11 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-07-14 15:41:24 +0200
commitf456445f29d22bb31ad29fdf1d6b2769decd37a2 (patch)
treead99f5c8f457271cab2e24d6fca82a8f8503b8f4 /rules.mk
parent026ca6591b1365fefb83ae6dcade62eca8c837a0 (diff)
downloadu-boot-imx-f456445f29d22bb31ad29fdf1d6b2769decd37a2.zip
u-boot-imx-f456445f29d22bb31ad29fdf1d6b2769decd37a2.tar.gz
u-boot-imx-f456445f29d22bb31ad29fdf1d6b2769decd37a2.tar.bz2
build: Add targets for auto gen of asm-offsets.h and use it in imx35
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>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index c2860e5..5fd12a0 100644
--- 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
#########################################################################