armv7a: imx6ull: make memtest compilable again
JIRA:
@@ -14,7 +14,14 @@ endif
OBJS += $(addprefix $(PREFIX_O)hal/armv7a/, spinlock.o cpu.o hal.o exceptions.o)
-#memtest: _memtest.o memtest.o
-# @arm-phoenix-ld -o memtest.elf -e _start --section-start .init=0x907000 -z max-page-size=0x1000 _memtest.o memtest.o
-# @$(OBJCOPY) memtest.elf -Obinary memtest.img
+# HACKISH: different OBJS for memtest target
+.PHONY: memtest
+memtest: $(PREFIX_PROG)/memtest.elf $(PREFIX_PROG)/memtest.img
+memtest: OBJS:=$(addprefix $(PREFIX_O)hal/armv7a/, _memtest.o memtest.o)
+
+$(PREFIX_PROG)/memtest.elf: $(PREFIX_O)hal/armv7a/_memtest.o $(PREFIX_O)hal/armv7a/memtest.o
+ $(SIL)$(LD) $(LDFLAGS) -o $@ -e _start --section-start .init=0x907000 -z max-page-size=0x1000 $^
+
+$(PREFIX_PROG)/memtest.img: $(PREFIX_PROG)/memtest.elf
+ $(SIL)$(OBJCOPY) $< -Obinary $@
