aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-03-20 10:23:29 +0100
committerLoïc Hoguin <[email protected]>2017-03-20 10:23:29 +0100
commit3d3a8dcdc9a2f45888059e69587dd07c45aa856a (patch)
treeadec3e31a300bc38d6ba35dfb03459aea6a5a9b9
parentd096ccefa1e342c6cefd5104425bbc24c71af516 (diff)
downloadesdl2-3d3a8dcdc9a2f45888059e69587dd07c45aa856a.tar.gz
esdl2-3d3a8dcdc9a2f45888059e69587dd07c45aa856a.tar.bz2
esdl2-3d3a8dcdc9a2f45888059e69587dd07c45aa856a.zip
Add cppcheck and scan-build to the Makefile
-rw-r--r--.gitignore1
-rw-r--r--Makefile9
2 files changed, 10 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e116fa1..0a9ec0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.erlang.mk
+.esdl2.plt
c_src/env.mk
c_src/*.o
ebin
diff --git a/Makefile b/Makefile
index 12cc181..6cfe5df 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,15 @@ ifeq ($(PLATFORM),msys2)
CFLAGS += -I"$(C_SRC_DIR)/compat/"
endif
+check:: cppcheck scan-build
+
+cppcheck:
+ cppcheck -f --quiet --error-exitcode=2 --enable=all --inconclusive --std=posix -I/usr/include/SDL2 c_src/
+
+scan-build:
+ make clean
+ scan-build make
+
bullet_engine:: all
erlc -o examples/bullet_engine examples/bullet_engine/*.erl
cd examples/bullet_engine && ./start.sh