1 # Port specification for the xxxx port running with uCsim
5 UCZ80 = $(SDCC_DIR)/bin/sz80
6 #UCZ80 = $(SDCC_DIR)/bin/s51
8 SDCCFLAGS +=-mz80 --lesspedantic --profile -DREENTRANT=
9 #SDCCFLAGS +=--lesspedantic -DREENTRANT=reentrant --stack-after-data
14 EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
16 # Rule to link into .ihx
17 #%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
19 %$(EXEEXT): %.c $(EXTRAS)
20 $(SDCC) $(SDCCFLAGS) $< $(EXTRAS)
21 # mv fwk/lib/testfwk.ihx $@
22 # mv fwk/lib/testfwk.map $(@:.ihx=.map)
25 $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
28 $(SDCC) $(SDCCFLAGS) -c $<
30 # run simulator with 10 seconds timeout
31 %.out: %$(EXEEXT) fwk/lib/timeout
33 -fwk/lib/timeout 10 $(UCZ80) -t32 $< < $(PORTS_DIR)/$(PORT)/uCsim.cmd > $@ \
34 || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
35 -grep -n FAIL $@ /dev/null || true
37 fwk/lib/timeout: fwk/lib/timeout.c
40 rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
41 $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm temp.lnk