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 -Wl-r
14 EXTRAS = $(PORTS_DIR)/$(PORT)/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 $(PORTS_DIR)/$(PORT)/testfwk$(OBJEXT): fwk/lib/testfwk.c
24 $(SDCC) $(SDCCFLAGS) -c $< -o $@
26 # run simulator with 10 seconds timeout
27 %.out: %$(EXEEXT) fwk/lib/timeout
29 -fwk/lib/timeout 10 $(S51) -tds390f -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/ds390/uCsim.cmd >/dev/null || \
30 echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
31 -grep -n FAIL $@ /dev/null || true
33 fwk/lib/timeout: fwk/lib/timeout.c
37 rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \
38 $(PORTS_DIR)/$(PORT)/*.lst $(PORTS_DIR)/$(PORT)/*.sym $(PORTS_DIR)/$(PORT)/*.asm \
39 $(PORTS_DIR)/$(PORT)/*.lnk $(PORTS_DIR)/$(PORT)/*.map $(PORTS_DIR)/$(PORT)/*.mem