summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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