new option -o
[fw/sdcc] / support / regression / ports / mcs51 / spec.mk
index d2d05045c133dc05dad58d5ea307f3e0dec28438..ba313c3caa0bf58fe6b5bd560caeba3d3d013be4 100644 (file)
@@ -17,18 +17,16 @@ EXTRAS = fwk/lib/testfwk$(OBJEXT) $(PORTS_DIR)/$(PORT)/support$(OBJEXT)
 
 # Rule to link into .ihx
 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
-       $(SDCC) $(SDCCFLAGS) $(EXTRAS) $<
-       mv fwk/lib/testfwk.ihx $@
-       mv fwk/lib/testfwk.map $(@:.ihx=.map)
+       $(SDCC) $(SDCCFLAGS) $(EXTRAS) $< -o $@
 
 %$(OBJEXT): %.c
-       $(SDCC) $(SDCCFLAGS) -c $<
+       $(SDCC) $(SDCCFLAGS) -c $< -o $@
 
 # run simulator with 10 seconds timeout
 %.out: %$(EXEEXT) fwk/lib/timeout
        mkdir -p `dirname $@`
        -fwk/lib/timeout 10 $(S51) -t32 -S in=/dev/null,out=$@ $< < $(PORTS_DIR)/mcs51/uCsim.cmd >/dev/null \
-         || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:.ihx=.c)"\n"--- Summary: 1/1/1: timeout >> $@
+         || echo -e --- FAIL: \"timeout, simulation killed\" in $(<:$(EXEEXT)=.c)"\n"--- Summary: 1/1/1: timeout >> $@
        -grep -n FAIL $@ /dev/null || true
 
 fwk/lib/timeout: fwk/lib/timeout.c