1 # Port specification for the ds390 port running with uCsim
4 S51A = $(SDCC_DIR)/sim/ucsim/s51.src/s51
5 S51B = $(SDCC_DIR)/bin/s51
7 S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
9 SDCCFLAGS +=-mds390 --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)
18 $(SDCC) $(SDCCFLAGS) $(EXTRAS) $< -o $@
21 $(SDCC) $(SDCCFLAGS) -c $< -o $@
23 # run simulator with 10 seconds timeout
24 %.out: %$(EXEEXT) fwk/lib/timeout
26 -fwk/lib/timeout 10 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
27 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
28 -grep -n FAIL $@ /dev/null || true
30 fwk/lib/timeout: fwk/lib/timeout.c
33 rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
34 $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm temp.lnk