X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=support%2Fregression%2Fports%2Fz80%2Fspec.mk;h=897774244ab0de87d2f28268011edba9593cc85b;hb=af7c1699ad0b8c76cbad35b919125cf02df012eb;hp=133394950bd57910eca111cb5f438b195bc96497;hpb=f239a9f256f022ade8216daba928e817f2d5f528;p=fw%2Fsdcc diff --git a/support/regression/ports/z80/spec.mk b/support/regression/ports/z80/spec.mk index 13339495..89777424 100644 --- a/support/regression/ports/z80/spec.mk +++ b/support/regression/ports/z80/spec.mk @@ -3,30 +3,40 @@ RRZ80 = $(SDCC_EXTRA_DIR)/emu/rrz80/rrz80 -SDCCFLAGS += --lesspedantic --profile +SDCCFLAGS +=-mz80 --nostdinc --less-pedantic --profile -DREENTRANT= -I$(top_srcdir) +LINKFLAGS = --nostdlib +LINKFLAGS += z80.lib +LIBDIR = $(top_builddir)/device/lib/build/z80 EXEEXT = .bin # Needs parts of gbdk-lib, namely the internal mul/div/mod functions. -EXTRAS = fwk/lib/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT) +EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT) # Rule to generate a Emulator .bin file from the .ihx linker output. %$(EXEEXT): %.ihx - ../makebin/makebin -s 32768 < $< > $@ # Must be 32768 due to a bug in ConsoleZ80 + $(top_builddir)/bin/makebin -s 32768 < $< > $@ # Rule to link into .ihx %.ihx: %.c $(EXTRAS) - $(SDCC) $(SDCCFLAGS) $< $(EXTRAS) + $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L$(LIBDIR) $(EXTRAS) $< -o $@ -%$(OBJEXT): %.asm - ../../bin/as-z80 -plosgff $@ $< +$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm + $(top_builddir)/bin/as-z80 -plosgff $@ $< %$(OBJEXT): %.s - ../../bin/as-z80 -plosgff $@ $< + $(top_builddir)/bin/as-z80 -plosgff $@ $< + +%$(OBJEXT): %.c + $(SDCC) $(SDCCFLAGS) -c $< -o $@ + +$(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c + $(SDCC) $(SDCCFLAGS) -c $< -o $@ # PENDING: Path to sdcc-extra %.out: %$(EXEEXT) - mkdir -p `dirname $@` + mkdir -p $(dir $@) $(RRZ80) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@ -grep -n FAIL $@ /dev/null || true +_clean: