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
14 EXTRAS = $(PORTS_DIR)/$(PORT)/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) -o $@
23 $(SDCC_DIR)/bin/as-z80 -plosgff $@ $<
26 $(SDCC) $(SDCCFLAGS) -c $< -o $@
28 $(PORTS_DIR)/$(PORT)/%$(OBJEXT): fwk/lib/%.c
29 $(SDCC) $(SDCCFLAGS) -c $< -o $@
31 # run simulator with 10 seconds timeout
32 %.out: %$(EXEEXT) fwk/lib/timeout
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
38 fwk/lib/timeout: fwk/lib/timeout.c
41 rm -f ports/$(PORT)/testfwk.asm ports/$(PORT)/*.lst ports/$(PORT)/*.o ports/$(PORT)/*.sym