aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2010-09-22 12:58:08 +0100
committerPeter Maydell <peter.maydell@linaro.org>2010-09-22 12:58:08 +0100
commitf770d350012df2f7e3a9418a7c2f9bcb39f824b4 (patch)
tree2b98364b4283ae8794c2f10f045ab645edeeda31 /Makefile
parent9a7806e41fcb2482d54b2902455567867fcad06d (diff)
Add a simple test image for ARM, and make the makefile only build the right one for the architecture.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b7319e1..d5c116e 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
PROG=risu
SRCS=risu.c comms.c risu_$(ARCH).c
HDRS=risu.h
-BINS=test_i386.bin
+BINS=test_$(ARCH).bin
OBJS=$(SRCS:.c=.o)
@@ -16,8 +16,14 @@ $(PROG): $(OBJS)
%.o: %.c $(HDRS)
$(CC) -g -Wall -Werror -o $@ -c $<
-%.bin: %.s
+%_i386.bin: %_i386.s
nasm -f bin -o $@ $<
+%_arm.bin: %_arm.elf
+ objcopy -O binary $< $@
+
+%_arm.elf: %_arm.s
+ as -o $@ $<
+
clean:
rm -f $(PROG) $(OBJS) $(BINS)