Fixed up s51 autodetect
[fw/sdcc] / support / regression / ports / ds390 / spec.mk
index efdc92d36efb9aa134a81e1360029ecd4ecbe012..1ff106bd4d311a630d594b11e5d42cafd84cecd2 100644 (file)
@@ -1,9 +1,12 @@
 # Port specification for the ds390 port running with uCsim
 
 # path to uCsim
-S51 = $(SDCC_DIR)/sim/ucsim/s51.src/s51
+S51A = $(SDCC_DIR)/sim/ucsim/s51.src/s51
+S51B = $(SDCC_DIR)/bin/s51
 
-SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data --debug
+S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
+
+SDCCFLAGS +=-mds390 --lesspedantic -DREENTRANT=reentrant --stack-after-data
 
 OBJEXT = .rel
 EXEEXT = .ihx