support/regression/fwk/lib/testfwk.c,
support/regression/ports/ds390/spec.mk,
support/regression/ports/hc08/spec.mk,
support/regression/ports/mcs51-common/spec.mk,
support/regression/ports/mcs51-large/spec.mk,
support/regression/ports/mcs51-medium/spec.mk,
support/regression/ports/mcs51-small/spec.mk,
support/regression/ports/mcs51-stack-auto/spec.mk,
support/regression/ports/mcs51-xstack-auto/spec.mk,
support/regression/ports/pic14/spec.mk,
support/regression/ports/pic16/spec.mk,
support/regression/ports/ucz80/spec.mk:
added possibility to define the sdcc binary directory SDCC_BIN_PATH
used to run regeression tests
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5152
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2008-05-04 Borut Razem <borut.razem AT siol.net>
+
+ * support/regression/Makefile.in,
+ support/regression/fwk/lib/testfwk.c,
+ support/regression/ports/ds390/spec.mk,
+ support/regression/ports/hc08/spec.mk,
+ support/regression/ports/mcs51-common/spec.mk,
+ support/regression/ports/mcs51-large/spec.mk,
+ support/regression/ports/mcs51-medium/spec.mk,
+ support/regression/ports/mcs51-small/spec.mk,
+ support/regression/ports/mcs51-stack-auto/spec.mk,
+ support/regression/ports/mcs51-xstack-auto/spec.mk,
+ support/regression/ports/pic14/spec.mk,
+ support/regression/ports/pic16/spec.mk,
+ support/regression/ports/ucz80/spec.mk:
+ added possibility to define the sdcc binary directory SDCC_BIN_PATH
+ used to run regeression tests
+
2008-05-01 Raphael Neider <rneider AT web.de>
* doc/sdccman.lyx, support/scripts/inc2h-pic16.pl: updated list of
PORT_RESULTS = $(ALL_TESTS:$(TESTS_DIR)/%.c=$(PORT_RESULTS_DIR)/%.out)
SDCC_EXTRA_DIR = $(top_builddir)/../sdcc-extra
-INC_DIR = $(top_srcdir)/device/include
# Defaults. Override in spec.mk if required.
# Path to SDCC
-SDCC = $(top_builddir)/bin/sdcc
+ifdef SDCC_BIN_PATH
+ SDCC = $(SDCC_BIN_PATH)/sdcc
+else
+ SDCC = $(top_builddir)/bin/sdcc
+endif
# Base flags.
SDCCFLAGS += --fverbose-asm -DNO_VARARGS
# Extension of object intermediate files
make_library: $(MAKE_LIBRARY)
-SDCCFLAGS += -I$(srcdir)/fwk/include -I$(srcdir)/tests -I$(INC_DIR)
+SDCCFLAGS += -I$(srcdir)/fwk/include -I$(srcdir)/tests
# List of intermediate files to keep. Pretty much keep everything as
# disk space is free.
-# Port specification for the ds390 port running with uCsim
+# Regression test specification for the ds390 target running with uCsim
ifndef DEV_NULL
DEV_NULL = /dev/null
endif
# path to uCsim
-S51A = $(top_builddir)/sim/ucsim/s51.src/s51
-S51B = $(top_builddir)/bin/s51
+ifdef SDCC_BIN_PATH
+ S51 = $(SDCC_BIN_PATH)/s51
+else
+ S51A = $(top_builddir)/sim/ucsim/s51.src/s51
+ S51B = $(top_builddir)/bin/s51
-S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
+ S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
-SDCCFLAGS +=-mds390 --nostdinc --less-pedantic -DREENTRANT=reentrant -Wl-r -I$(top_srcdir)
-LINKFLAGS = --nostdlib
+ SDCCFLAGS += --nostdinc
+ LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/ds390
+endif
+
+SDCCFLAGS +=-mds390 --less-pedantic -DREENTRANT=reentrant -Wl-r -I$(top_srcdir)
LINKFLAGS += libds390.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
-LIBDIR = $(top_builddir)/device/lib/build/ds390
OBJEXT = .rel
EXEEXT = .ihx
# 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 $@
+# Regression test specification for the hc08 target running with uCsim
+#
+
# path to uCsim
-UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08
-UCHC08B = $(top_builddir)/bin/shc08
+ifdef SDCC_BIN_PATH
+ UCHC08 = $(SDCC_BIN_PATH)/shc08
+
+ AS_HC08 = $(SDCC_BIN_PATH)/as-hc08
+else
+ UCHC08A = $(top_builddir)/sim/ucsim/hc08.src/shc08
+ UCHC08B = $(top_builddir)/bin/shc08
+
+ UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi)
+
+ AS_HC08 = $(top_builddir)/bin/as-hc08
-UCHC08 = $(shell if [ -f $(UCHC08A) ]; then echo $(UCHC08A); else echo $(UCHC08B); fi)
+ SDCCFLAGS += --nostdinc
+ LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/hc08
+endif
-SDCCFLAGS +=-mhc08 --nostdinc --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir)
-LINKFLAGS = --nostdlib
+SDCCFLAGS +=-mhc08 --less-pedantic --out-fmt-ihx -DREENTRANT=reentrant -I$(top_srcdir)
LINKFLAGS += hc08.lib
-LIBDIR = $(top_builddir)/device/lib/build/hc08
OBJEXT = .rel
EXEEXT = .ihx
#%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
%$(EXEEXT): %$(OBJEXT) $(EXTRAS)
- $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
+ $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@
%$(OBJEXT): %.asm
- $(top_builddir)/bin/as-hc08 -plosgff $<
+ $(AS_HC08) -plosgff $<
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-# Common specification for the mcs51 ports running with uCsim
+# Common regression test specification for the mcs51 targets running with uCsim
ifndef DEV_NULL
DEV_NULL = /dev/null
endif
# path to uCsim
-S51A = $(top_builddir)/sim/ucsim/s51.src/s51
-S51B = $(top_builddir)/bin/s51
+ifdef SDCC_BIN_PATH
+ S51 = $(SDCC_BIN_PATH)/s51
+else
+ S51A = $(top_builddir)/sim/ucsim/s51.src/s51
+ S51B = $(top_builddir)/bin/s51
-S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
+ S51 = $(shell if [ -f $(S51A) ]; then echo $(S51A); else echo $(S51B); fi)
-SDCCFLAGS +=--nostdinc --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir)
-LINKFLAGS = --nostdlib
+ SDCCFLAGS += --nostdinc
+ LINKFLAGS += --nostdlib
+endif
+
+SDCCFLAGS += --less-pedantic -DREENTRANT=reentrant -I$(INC_DIR)/mcs51 -I$(top_srcdir)
LINKFLAGS += mcs51.lib libsdcc.lib liblong.lib libint.lib libfloat.lib
OBJEXT = .rel
# Rule to link into .ihx
%$(EXEEXT): %$(OBJEXT) $(EXTRAS) $(FWKLIB) $(PORT_CASES_DIR)/fwk.lib
- $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
+ $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $(PORT_CASES_DIR)/fwk.lib $< -o $@
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@
-# Port specification for the mcs51-large port running with uCsim
+# Regression test specification for the mcs51-large target running with uCsim
#
# model large
-# Port specification for the mcs51-medium port running with uCsim
+# Regression test specification for the mcs51-medium target running with uCsim
#
# model medium
-# Port specification for the mcs51 port running with uCsim
+# Regression test specification for the mcs51 target running with uCsim
#
# model small
-# Port specification for the mcs51-stack-auto port running with uCsim
+# Regression test specification for the mcs51-stack-auto target running with uCsim
#
# model small stack-auto
-# Port specification for the mcs51-xstack-auto port running with uCsim
+# Regression test specification for the mcs51-xstack-auto target running with uCsim
#
# model small xstack-auto
-# Port specification for the pic14 port running with gpsim
+# Regression test specification for the pic14 target running with gpsim
# path to gpsim
ifdef GPSIM_PATH
GPSIM := gpsim
endif
-SDCCFLAGS += -mpic14 -pp16f877 -I$(top_srcdir)/device/include/pic --nostdinc --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
-LINKFLAGS = --nostdlib
+ifndef SDCC_BIN_PATH
+ SDCCFLAGS += --nostdinc
+ LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/pic
+endif
+
+SDCCFLAGS += -mpic14 -pp16f877 -I$(top_srcdir)/device/include/pic --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
LINKFLAGS += libsdcc.lib libm.lib
-LIBDIR = $(top_builddir)/device/lib/build/pic
OBJEXT = .o
EXEEXT = .cod
# 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 $@
-# 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
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
+ LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/pic16
+endif
+
+SDCCFLAGS += -mpic16 -pp18f452 -I$(top_srcdir)/device/include/pic16 --less-pedantic -Wl,-q -DREENTRANT=reentrant -I$(top_srcdir)
+SDCCFLAGS += --no-peep
LINKFLAGS += libsdcc.lib libc18f.lib libm18f.lib
-LIBDIR = $(top_builddir)/device/lib/build/pic16
OBJEXT = .o
EXEEXT = .cod
# 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 $@
-# Port specification for the xxxx port running with uCsim
+# Regression test specification for the z80 target running with uCsim
#
# path to uCsim
-# path to uCsim
-SZ80A = $(top_builddir)/sim/ucsim/z80.src/sz80
-SZ80B = $(top_builddir)/bin/sz80
+ifdef SDCC_BIN_PATH
+ UCZ80 = $(SDCC_BIN_PATH)/sz80
+
+ AS_Z80 = $(SDCC_BIN_PATH)/as-z80
+else
+ SZ80A = $(top_builddir)/sim/ucsim/z80.src/sz80
+ SZ80B = $(top_builddir)/bin/sz80
+
+ UCZ80 = $(shell if [ -f $(SZ80A) ]; then echo $(SZ80A); else echo $(SZ80B); fi)
+
+ AS_Z80 = $(top_builddir)/bin/as-z80
-UCZ80 = $(shell if [ -f $(SZ80A) ]; then echo $(SZ80A); else echo $(SZ80B); fi)
+ SDCCFLAGS += --nostdinc
+ LINKFLAGS += --nostdlib -L $(top_builddir)/device/lib/build/z80
+endif
SDCCFLAGS +=-mz80 --less-pedantic --profile -DREENTRANT= -I$(top_srcdir)
#SDCCFLAGS +=--less-pedantic -DREENTRANT=reentrant
-LINKFLAGS = --nostdlib
LINKFLAGS += z80.lib
-LIBDIR = $(top_builddir)/device/lib/build/z80
#OBJEXT = .o
EXEEXT = .ihx
# Rule to link into .ihx
%.ihx: %.c $(EXTRAS)
- $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) -L $(LIBDIR) $(EXTRAS) $< -o $@
+ $(SDCC) $(SDCCFLAGS) $(LINKFLAGS) $(EXTRAS) $< -o $@
$(PORT_CASES_DIR)/%$(OBJEXT): $(PORTS_DIR)/$(PORT)/%.asm
- $(top_builddir)/bin/as-z80 -plosgff $@ $<
+ $(AS_Z80) -plosgff $@ $<
%$(OBJEXT): %.c
$(SDCC) $(SDCCFLAGS) -c $< -o $@