* Makefile.in, configure.in, configure,
[fw/sdcc] / support / regression / ports / pic16 / spec.mk
index b1fdcb0e71960182ddcc0936a600e3f65c8ad704..c436491ec05edb37bd7ae3b66d3963a5d4b1383a 100644 (file)
@@ -1,4 +1,4 @@
-# Port specification for the pic16 port running with gpsim
+# Regression test specification for the pic16 target running with gpsim
 
 # path to gpsim
 ifdef GPSIM_PATH
@@ -7,10 +7,14 @@ else
   GPSIM := gpsim
 endif
 
-SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --nostdinc --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
-LINKFLAGS = --nostdlib
+ifndef SDCC_BIN_PATH
+  SDCCFLAGS += --nostdinc -I$(top_srcdir)/device/include/pic16 -I$(top_srcdir)
+  LINKFLAGS += --nostdlib -L$(top_builddir)/device/lib/build/pic16
+endif
+
+SDCCFLAGS += -mpic16 -pp18f452 --less-pedantic -Wl,-q -DREENTRANT=reentrant
+SDCCFLAGS += --no-peep
 LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
-LIBDIR = $(top_builddir)device/lib/build/pic16
 
 OBJEXT = .o
 EXEEXT = .cod
@@ -19,13 +23,13 @@ EXTRAS = $(PORT_CASES_DIR)/testfwk$(OBJEXT) $(PORT_CASES_DIR)/support$(OBJEXT)
 
 # Rule to link into .ihx
 %$(EXEEXT): %$(OBJEXT) $(EXTRAS)
-       $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
+       -$(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@
 
 %$(OBJEXT): %.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+       -$(SDCC) $(SDCCFLAGS) -c $< -o $@
 
 $(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.c
-       $(SDCC) $(SDCCFLAGS) -c $< -o $@
+       -$(SDCC) $(SDCCFLAGS) -c $< -o $@
 
 .PRECIOUS: gen/pic16/testfwk.o gen/pic16/support.o
 
@@ -41,6 +45,6 @@ $(PORT_CASES_DIR)/%$(OBJEXT): fwk/lib/%.c
        -grep -n FAIL $@ /dev/null || true
 
 $(CASES_DIR)/timeout: fwk/lib/timeout.c
-       $(CC) $< -o $@
+       $(CC) $(CFLAGS) $< -o $@
 
 _clean: