Turned off dumpall
[fw/sdcc] / support / regression / ports / z80 / spec.mk
1 # Port specification for the z80 port running ontop of the Java based
2 # 'ConsoleZ80' emulator.
3
4 RRZ80 = $(SDCC_EXTRA_DIR)/emu/rrz80/rrz80
5
6 SDCCFLAGS += --lesspedantic --profile -DREENTRANT= -DGENERIC=
7
8 EXEEXT = .bin
9
10 # Needs parts of gbdk-lib, namely the internal mul/div/mod functions.
11 EXTRAS = fwk/lib/testfwk$(OBJEXT) ports/$(PORT)/support$(OBJEXT)
12
13 # Rule to generate a Emulator .bin file from the .ihx linker output.
14 %$(EXEEXT): %.ihx
15         ../makebin/makebin -s 32768 < $< > $@  # Must be 32768 due to a bug in ConsoleZ80
16
17 # Rule to link into .ihx
18 %.ihx: %.c $(EXTRAS)
19         $(SDCC) $(SDCCFLAGS) $< $(EXTRAS)
20
21 %$(OBJEXT): %.asm
22         ../../bin/as-z80 -plosgff $@ $<
23
24 %$(OBJEXT): %.s
25         ../../bin/as-z80 -plosgff $@ $<
26
27 %$(OBJEXT): %.c
28         $(SDCC) $(SDCCFLAGS) -c $<
29
30 # PENDING: Path to sdcc-extra
31 %.out: %$(EXEEXT)
32         mkdir -p `dirname $@`
33         $(RRZ80) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@
34         -grep -n FAIL $@ /dev/null || true
35