
Dear Stefano Babic,
In message 1309426950-20987-2-git-send-email-sbabic@denx.de you wrote:
On i.MX27, the asm-offsets.h file is not yet generated as it should be.
Signed-off-by: Stefano Babic sbabic@denx.de CC: Matthias Weisser weisserm@arcor.de
arch/arm/cpu/arm926ejs/mx27/Makefile | 13 +++++++ arch/arm/cpu/arm926ejs/mx27/asm-offsets.c | 45 ++++++++++++++++++++++++++ arch/arm/include/asm/arch-mx27/asm-offsets.h | 16 --------- 3 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/mx27/asm-offsets.c delete mode 100644 arch/arm/include/asm/arch-mx27/asm-offsets.h
diff --git a/arch/arm/cpu/arm926ejs/mx27/Makefile b/arch/arm/cpu/arm926ejs/mx27/Makefile index 0e112b3..2d65e70 100644 --- a/arch/arm/cpu/arm926ejs/mx27/Makefile +++ b/arch/arm/cpu/arm926ejs/mx27/Makefile @@ -34,6 +34,8 @@ all: $(obj).depend $(LIB) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS))
+$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
#########################################################################
# defines $(obj).depend target @@ -42,3 +44,14 @@ 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
I don't think it makes sense to copy the make rules for asm-offsets.h and asm-offsets.s into each and every Makefile that needs them.
We should rather add these rules only once (either in rules.mk or in the toplevel Makefile) and then only add the target to be built in the board / cpu Makefiles that need them.
Best regards,
Wolfgang Denk