aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e843671..f36b952 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+# Static analysis
+CC_SANA ?= clang
+CFLAGS_SANA ?= --analyze -Xclang -analyzer-output=text
.PHONY: all
all: build
@@ -14,6 +17,10 @@ build:
tests:
cd ./tests/ && $(MAKE)
+.PHONY: static-analysis
+static-analysis:
+ $(CC_SANA) $(CFLAGS_SANA) ./src/*
+
.PHONY: clean
clean:
cd ./src/ && $(MAKE) clean