summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAstrid Smith2010-09-10 18:16:29 -0700
committerAstrid Smith2010-09-10 18:16:29 -0700
commit522b7ce4d83ef08fadc9fbc4b700a2ef6bbd9c0e (patch)
treeb0a060b2779b63f0798d69dc251a990b465bec74 /Makefile
parent548316a52d8649556ebbc8b3a7835ac7ae4aa7c0 (diff)
Trying to get the zexdoc testbench to run.
Now, at least, it's integrated into the build system and will be automatically included in built executables.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f3bb30f..3771499 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,21 @@
ASM_FILES=alu.asm flags.asm opcodes.asm ports.asm interrupts.asm main.asm
ASM=main.asm
C_FILES=loader.c bankswap.c video.c misc.c debug.c
+MADE_FILES=testbenches/zexdoc.h
TIGCCFLAGS=-Wall
CFLAGS=-Wall -ltifiles
-z680.89z: $(ASM_FILES) $(C_FILES)
+z680.89z: $(ASM_FILES) $(C_FILES) $(MADE_FILES)
tigcc $(TIGCCFLAGS) $(ASM) $(C_FILES) -o z680.89z
packager: packager.c
gcc $(CFLAGS) packager.c -o packager
+
+testbenches/zexdoc.h: testbenches/zexdoc.bin
+ echo 'char zexdoc[] = {' > testbenches/zexdoc.h
+ hexdump -v -e '12/1 "0x%02x, "' -e '"\n"' testbenches/zexdoc.bin | sed -e 's/0x *,//g' >> testbenches/zexdoc.h
+ echo '};' >> testbenches/zexdoc.h
+
+testbenches/zexdoc.bin: testbenches/zexdoc.z80
+ spasm testbenches/zexdoc.z80