projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* src/hc08/gen.c (genPointerGetSetOfs): correctly handle 1 byte array
[fw/sdcc]
/
src
/
regression
/
Makefile
diff --git
a/src/regression/Makefile
b/src/regression/Makefile
index d1ce27ad31432c0a3b79f24dd649c8208671edd2..3e096e7817eac2e18f72b01a00c0107d738dc7ba 100644
(file)
--- a/
src/regression/Makefile
+++ b/
src/regression/Makefile
@@
-1,5
+1,10
@@
# Regression testing Makefile for Pic Port of SDCC
#
# Regression testing Makefile for Pic Port of SDCC
#
+# note that this regression suite was started before
+# the one in sdcc/regression. The regression suite in
+# sdcc/regression is better suited for testing mature
+# ports.
+#
# GPL'd
#
# T. Scott Dattalo scott@dattalo.com
# GPL'd
#
# T. Scott Dattalo scott@dattalo.com
@@
-9,7
+14,7
@@
# is unique to the PIC (as in Microchip PIC) port.
# As such it requires the following software:
#
# is unique to the PIC (as in Microchip PIC) port.
# As such it requires the following software:
#
-# gpasm version 0.
8.10
(or greater)
+# gpasm version 0.
11.1
(or greater)
# gpsim version 0.20.7 (or greater)
#
# Usage:
# gpsim version 0.20.7 (or greater)
#
# Usage:
@@
-37,10
+42,15
@@
# make cleancod
# make cleanasm
# make cleanstc
# make cleancod
# make cleanasm
# make cleanstc
-# - removes either the .stc, .asm, or .cod files
+# make cleano
+# - removes either the .stc, .asm, .cod or .o files
CC = ../../bin/sdcc
CC = ../../bin/sdcc
+LINKER = gplink
+TARGETPIC = 16f873
+TARGETPIC2 = 16f877
+CFLAGS = -mpic14 -c -pp$(TARGETPIC)
.SUFFIXES: .asm .c .cod .stc
.SUFFIXES: .asm .c .cod .stc
@@
-56,33
+66,67
@@
SIMULATE = simulate
# List the C files to be test here:
SRC = b.c \
add.c \
# List the C files to be test here:
SRC = b.c \
add.c \
+ add2.c \
+ add3.c \
+ and1.c \
+ and2.c \
bool1.c \
bool1.c \
+ bool2.c \
+ bool3.c \
call1.c \
compare.c \
compare2.c \
call1.c \
compare.c \
compare2.c \
+ compare3.c \
+ compare4.c \
+ compare5.c \
+ compare6.c \
for.c \
for.c \
+ nestfor.c \
+ or1.c \
+ rotate1.c \
+ rotate2.c \
+ rotate3.c \
+ rotate4.c \
+ rotate5.c \
sub.c \
sub.c \
- while.c
+ sub2.c \
+ switch1.c \
+ while.c \
+ xor.c \
+ ptrfunc.c
+
+# struct1.c \
+# mul1.c \
COD := $(patsubst %.c, %.cod, $(SRC))
ASM := $(patsubst %.c, %.asm, $(SRC))
COD := $(patsubst %.c, %.cod, $(SRC))
ASM := $(patsubst %.c, %.asm, $(SRC))
+O := $(patsubst %.c, %.o, $(SRC))
STC := $(patsubst %.c, %.stc, $(SRC))
STC := $(patsubst %.c, %.stc, $(SRC))
+HEX := $(patsubst %.c, %.hex, $(SRC))
+LST := $(patsubst %.c, %.lst, $(SRC))
+MAP := $(patsubst %.c, %.map, $(SRC))
all: test
# The asm files are generated by sdcc
all: test
# The asm files are generated by sdcc
-.c.
asm
:
- $(CC)
-mpic14 -c
$*.c
+.c.
o
:
+ $(CC)
$(CFLAGS)
$*.c
# The .cod files are generated by gpasm
# these get loaded by gpsim.
# The .cod files are generated by gpasm
# these get loaded by gpsim.
-.asm.cod:
- gpasm $*.asm
+.o.cod:
+ $(LINKER) --map -c -s $(TARGETPIC2).lkr -o $*.o $*.o
+
+# gpasm $*.asm
+
+# gpasm -c -I $(HEADER) $*.asm
+
# The .stc files are script files for gpsim
.cod.stc:
./$(CREATESTC) $*.cod $*.stc
# The .stc files are script files for gpsim
.cod.stc:
./$(CREATESTC) $*.cod $*.stc
+ ./$(SIMULATE) $*.stc $(LOGFILE)
# this will also make .stc files
#%.stc : %.cod
# this will also make .stc files
#%.stc : %.cod
@@
-92,18
+136,14
@@
all: test
cod : $(COD)
cod : $(COD)
+o : $(O)
asm : $(ASM)
stc : $(STC)
asm : $(ASM)
stc : $(STC)
+ echo $(STC)
test: $(STC)
test: $(STC)
- if [ -n "$(STC)" ]; then \
- stcfiles="$(STC)" ; \
- for f in $$stcfiles ; do \
- ./$(SIMULATE) $$f $(LOGFILE); \
- done ; \
- fi
echo "Done - Results are in $(LOGFILE)"
cleancod:
echo "Done - Results are in $(LOGFILE)"
cleancod:
@@
-112,6
+152,12
@@
cleancod:
if [ -f $$f ]; then rm $$f; fi \
done ; \
if [ -f $$f ]; then rm $$f; fi \
done ; \
+cleano:
+ files="$(O)" ; \
+ for f in $$files ; do \
+ if [ -f $$f ]; then rm $$f; fi \
+ done ; \
+
cleanasm:
files="$(ASM)" ; \
for f in $$files ; do \
cleanasm:
files="$(ASM)" ; \
for f in $$files ; do \
@@
-124,5
+170,17
@@
cleanstc:
if [ -f $$f ]; then rm $$f; fi \
done ; \
if [ -f $$f ]; then rm $$f; fi \
done ; \
-clean: cleancod cleanasm cleanstc
+cleanhex:
+ files="$(HEX)" ; \
+ for f in $$files ; do \
+ if [ -f $$f ]; then rm $$f; fi \
+ done ; \
+
+cleanlst:
+ files="$(LST)" ; \
+ for f in $$files ; do \
+ if [ -f $$f ]; then rm $$f; fi \
+ done ; \
+
+clean: cleancod cleanasm cleanstc cleano cleanhex cleanlst
if [ -f "$(LOGFILE)" ]; then rm $(LOGFILE); fi
if [ -f "$(LOGFILE)" ]; then rm $(LOGFILE); fi