* sdcc/sim/ucsim/s51.src/glob.cc: Minor fix.
[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 +=-mz80 --lesspedantic --profile -DREENTRANT=
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         $(SDCC_DIR)/bin/makebin -s 32768 < $< > $@
16
17 # Rule to link into .ihx
18 %.ihx: %.c $(EXTRAS)
19         $(SDCC) $(SDCCFLAGS) $< $(EXTRAS)
20
21 %$(OBJEXT): %.asm
22         $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
23
24 %$(OBJEXT): %.s
25         $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
26
27 %$(OBJEXT): %.c
28         $(SDCC) $(SDCCFLAGS) -c $<
29
30 fwk/lib/testfwk$(OBJEXT): fwk/lib/testfwk.c
31         $(SDCC) $(SDCCFLAGS) -c $<
32
33 # PENDING: Path to sdcc-extra
34 %.out: %$(EXEEXT)
35         mkdir -p `dirname $@`
36         $(RRZ80) --maxruntime=3 --mapfile=$(<:.bin=.sym) $< > $@
37         -grep -n FAIL $@ /dev/null || true
38
39 _clean:
40         rm -f ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym
41