* src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES
[fw/sdcc] / src / regression / Makefile
index d5fe5caee08a0822469bfcb6945fef71b47e8f14..d2914e34fb86565e46e8bafb361f71cb6651392c 100644 (file)
@@ -14,7 +14,7 @@
 # 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:
 # 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
 
+# verboseness
+#Q ?= # be verbose
+Q ?= @ # be quiet
 
-CC = ../../bin/sdcc
-
-HEADER=/usr/local/share/gpasm/header
+CC = sdcc
+LINKER = gplink
+TARGETPIC = 16f877
+CFLAGS = -Wl,--map -I ../../device/include/pic -mpic14 -pp$(TARGETPIC) -Wl,-q
 
 .SUFFIXES: .asm .c .cod .stc
 
@@ -66,7 +71,10 @@ SRC = b.c \
        add2.c \
        add3.c \
        and1.c \
+       and2.c \
+       b.c \
        bool1.c \
+       bool3.c \
        call1.c \
        compare.c \
        compare2.c \
@@ -75,41 +83,56 @@ SRC = b.c \
        compare5.c \
        compare6.c \
        for.c \
+       inline.c \
+       nestfor.c \
        or1.c \
+       ptrarg.c \
+       ptrfunc.c \
        rotate1.c \
        rotate2.c \
        rotate3.c \
        rotate4.c \
-       struct1.c \
+       rotate5.c \
        sub.c \
        sub2.c \
        switch1.c \
        while.c \
        xor.c
-
-#      mul1.c \
+#      arrays.c \
+#      add4.c \
+#      bank1.c \
+#      compare7.c \
+#      compare8.c \
+#      compare9.c \
+#      compare10.c \
+#      configword.c \
+#      mult1.c \
+#      pointer1.c \
+#      rotate6.c \
+#      rotate7.c \
+#      string1.c \
+#      struct1.c \
+#      bool2.c \
 
 COD := $(patsubst %.c, %.cod, $(SRC))
 ASM := $(patsubst %.c, %.asm, $(SRC))
+O := $(patsubst %.c, %.o, $(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
-.c.asm:
-       $(CC) -mpic14 -c $*.c
-
-# The .cod files are generated by gpasm
-# these get loaded by gpsim.
-.asm.cod:
-       gpasm -c -I $(HEADER) $*.asm
+# The cod files are generated by sdcc
+.c.cod:
+       $(Q)$(CC) $(CFLAGS) $*.c
 
 # The .stc files are script files for gpsim
 .cod.stc:
-       ./$(CREATESTC) $*.cod $*.stc
-       echo "Created $*.stc"
-       ./$(SIMULATE) $*.stc $(LOGFILE)
+       $(Q)./$(CREATESTC) $*.cod $*.stc
+       $(Q)./$(SIMULATE) $*.stc $(LOGFILE)
 
 # this will also make .stc files
 #%.stc : %.cod
@@ -119,13 +142,15 @@ all:      test
 
 cod : $(COD)
 
+o : $(O)
 
 asm : $(ASM)
 
 stc : $(STC)
+       echo $(STC)
 
 test:  $(STC)
-       echo "Done - Results are in $(LOGFILE)"
+       $(Q)echo "Done - Results are in $(LOGFILE)"
 
 cleancod:
        files="$(COD)" ; \
@@ -133,6 +158,12 @@ cleancod:
          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 \
@@ -145,5 +176,17 @@ cleanstc:
          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