1 # Port specification for the z80 port running ontop of the Java based
2 # 'ConsoleZ80' emulator.
4 RRZ80 = $(SDCC_EXTRA_DIR)/emu/rrz80/rrz80
6 SDCCFLAGS +=-mz80 --nostdinc --less-pedantic --profile -DREENTRANT=
9 LIBDIR = $(SDCC_DIR)/device/lib/build/z80
13 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
14 EXTRAS = ports/$(PORT)/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
16 # Rule to generate a Emulator .bin file from the .ihx linker output.
18 $(SDCC_DIR)/bin/makebin -s 32768 < $< > $@
20 # Rule to link into .ihx
22 $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
25 $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
28 $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
31 $(SDCC) $(SDCCFLAGS) -c $< -o $@
33 ports/$(PORT)/%$(OBJEXT): fwk/lib/%.c
34 $(SDCC) $(SDCCFLAGS) -c $< -o $@
36 # PENDING: Path to sdcc-extra
39 $(RRZ80) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@
40 -grep -n FAIL $@ /dev/null || true
43 rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym