Fixed up s51 autodetect
[fw/sdcc] / support / regression / ports / ds390 / spec.mk
index 26d3080045982d28cc639c922c2b28a46bed8053..1ff106bd4d311a630d594b11e5d42cafd84cecd2 100644 (file)
@@ -1,7 +1,10 @@
 # Port specification for the ds390 port running with uCsim
 
 # path to uCsim
-S51 = ../../sim/ucsim/s51.src/s51
+S51A = $(SDCC_DIR)/sim/ucsim/s51.src/s51
+S51B = $(SDCC_DIR)/bin/s51
+
+S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
 
 SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data
 
@@ -27,7 +30,6 @@ EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
        -grep -n FAIL $@ /dev/null || true
 
 fwk/lib/timeout: fwk/lib/timeout.c
-       gcc -o $@ $<
 
 _clean:
        rm -f fwk/lib/timeout fwk/lib/timeout.exe $(PORTS_DIR)/$(PORT)/*.rel $(PORTS_DIR)/$(PORT)/*.rst \