aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/qtools/tests/common_head.mk
diff options
context:
space:
mode:
Diffstat (limited to 'emulator/qtools/tests/common_head.mk')
-rw-r--r--emulator/qtools/tests/common_head.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/emulator/qtools/tests/common_head.mk b/emulator/qtools/tests/common_head.mk
new file mode 100644
index 0000000..e8170e9
--- /dev/null
+++ b/emulator/qtools/tests/common_head.mk
@@ -0,0 +1,25 @@
+CC := arm-elf-gcc
+LD := arm-elf-ld
+AS := arm-elf-as
+OBJCOPY := arm-elf-objcopy
+OBJDUMP := arm-elf-objdump
+
+OPT := -g
+CFLAGS := $(OPT) -mcpu=arm9
+
+.SUFFIXES: .dis .bin .elf
+
+.c.elf:
+ $(CC) $(CFLAGS) -Xlinker --script ../tests.ld -o $@ $< -nostdlib
+
+.c.s:
+ $(CC) $(CFLAGS) -static -S $<
+
+.S.elf:
+ $(CC) $(CFLAGS) -Xlinker --script ../tests.ld -nostdlib -o $@ $<
+
+.elf.dis:
+ $(OBJDUMP) -adx $< > $@
+
+.elf.bin:
+ $(OBJCOPY) -O binary $< $@