1 # Port specification for the z80 port running ontop of the Java based
2 # 'ConsoleZ80' emulator.
4 # PENDING: Patch to gbdk-lib for stdarg
5 SDCCFLAGS += -I/home/michaelh/projects/gbdk-lib/include
9 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
10 EXTRAS = fwk/lib/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT) \
11 /home/michaelh/projects/gbdk-lib/libc/asm/z80/mul$(OBJEXT) \
12 /home/michaelh/projects/gbdk-lib/libc/asm/z80/div$(OBJEXT)
14 # Rule to generate a Emulator .bin file from the .ihx linker output.
16 ../makebin/makebin -s 32768 < $< > $@ # Must be 32768 due to a bug in ConsoleZ80
18 # Rule to link into .ihx
19 %.ihx: %$(OBJEXT) $(EXTRAS)
20 ../../bin/link-z80 -n -- -b_CODE=0x200 -b_DATA=0x8000 -i $@ $< $(EXTRAS)
22 %$(OBJEXT): %.c fwk/include/*.h
23 $(SDCC) $(SDCCFLAGS) -c $<
26 ../../bin/as-z80 -plosgff $@ $<
29 ../../bin/as-z80 -plosgff $@ $<
33 java -cp /home/michaelh/projects/rose ConsoleZ80 $< > $@
34 if grep -q FAIL $@; then echo FAILURES in $@; fi