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= -I$(top_srcdir)
9 LIBDIR = $(top_builddir)/device/lib/build/z80
13 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
14 EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
16 # Rule to generate a Emulator .bin file from the .ihx linker output.
18 $(top_builddir)/bin/makebin -s 32768 < $< > $@
20 # Rule to link into .ihx
22 $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L$(LIBDIR) $(EXTRAS) $< -o $@
24 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
25 $(top_builddir)/bin/as-z80 -plosgff $@ $<
28 $(top_builddir)/bin/as-z80 -plosgff $@ $<
31 $(SDCC) $(SDCCFLAGS) -c $< -o $@
33 $(PORT_CASES_DIR)/%$(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