--lesspedantic is --less-pedantic now
[fw/sdcc] / support / regression / ports / ucz80 / spec.mk
1 # Port specification for the xxxx port running with uCsim
2 #
3
4 # path to uCsim
5 UCZ80 = $(SDCC_DIR)/bin/sz80
6 #UCZ80 = $(SDCC_DIR)/bin/s51
7
8 SDCCFLAGS +=-mz80 --less-pedantic --profile -DREENTRANT=
9 #SDCCFLAGS +=--less-pedantic -DREENTRANT=reentrant
10
11 #OBJEXT = .o
12 EXEEXT = .ihx
13
14 EXTRAS = $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
15
16 # Rule to link into .ihx
17 #%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
18
19 %$(EXEEXT): %.c $(EXTRAS)
20         $(SDCC) $(SDCCFLAGS) $< $(EXTRAS) -o $@
21
22 %$(OBJEXT): %.asm
23         $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
24
25 %$(OBJEXT): %.c
26         $(SDCC) $(SDCCFLAGS) -c $< -o $@
27
28 $(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c
29         $(SDCC) $(SDCCFLAGS) -c $< -o $@
30
31 # run simulator with 10 seconds timeout
32 %.out: %$(EXEEXT) fwk/lib/timeout
33         mkdir -p `dirname $@`
34         -fwk/lib/timeout 10 $(UCZ80) -t32 $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
35           || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
36         -grep -n FAIL $@ /dev/null || true
37
38 fwk/lib/timeout: fwk/lib/timeout.c
39
40 _clean:
41         rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym
42