MINGW = $(findstring MINGW32, $(UNAME))
CC ?= clang
- CFLAGS += -Wall -Wextra -I. -fno-strict-aliasing -fsigned-char -O2
+ CFLAGS += -Wall -Wextra -I. -fno-strict-aliasing -fsigned-char
CFLAGS += -DGMQCC_GITINFO="`git describe`"
#turn on tons of warnings if clang is present
# but also turn off the STUPID ONES
endif
endif
+#splint flags
+SPLINTFLAGS = \
+ -redef \
+ -noeffect \
+ -nullderef \
+ -usedef \
+ -type \
+ -mustfreeonly \
+ -nullstate \
+ -varuse \
+ -mustfreefresh \
+ -compdestroy \
+ -compmempass \
+ -nullpass \
+ -onlytrans \
+ -predboolint \
+ -boolops \
+ -exportlocal \
+ -incondefs \
+ -macroredef \
+ -retvalint \
+ -nullret \
+ -predboolothers \
+ -globstate \
+ -dependenttrans \
+ -branchstate \
+ -compdef \
+ -temptrans \
+ -usereleased \
+ -warnposix \
+ -shiftimplementation \
+ +charindex \
+ -kepttrans \
+ -unqualifiedtrans \
+ +matchanyintegral \
+ -bufferoverflowhigh \
+ +voidabstract \
+ -nullassign \
+ -unrecog \
+ -casebreak \
+ -retvalbool \
+ -retvalother \
+ -mayaliasunique \
+ -realcompare \
+ -observertrans \
+ -shiftnegative \
+ -freshtrans \
+ -abstract \
+ -statictrans \
+ -castfcnptr
+
#standard rules
default: all
%.o: %.c
rm -f *.o $(GMQCC) $(QCVM) $(TESTSUITE) *.dat
splint:
- @ ./splint.sh
+ @ splint $(SPLINTFLAGS) *.c *.h
depend:
@makedepend -Y -w 65536 2> /dev/null \