Makefile

changeset 287
99bcd7915a0d
parent 259
6c8d5f8a1d6f
child 407
9505224d2fd2
--- a/Makefile	Tue Aug 22 17:48:17 2017 +0200
+++ b/Makefile	Thu Aug 31 12:44:25 2017 +0200
@@ -40,9 +40,13 @@
 PREFIX=/usr
 
 include $(CONF).mk
+include cppcheck.mk
 
 all: build/tool build/ucx build/libidav build/test ucx libidav dav test
 
+build:
+	mkdir -p build
+
 build/tool:
 	mkdir -p build/tool
     
@@ -79,5 +83,11 @@
 	./install-sh build/dav $(DESTDIR)$(PREFIX)/bin
 	./install-sh build/dav-sync $(DESTDIR)$(PREFIX)/bin
 
+cppcheck: FORCE build
+	truncate -s0 $(CPPCHECK_LOG)
+	cd libidav; $(MAKE) cppcheck
+	cd dav; $(MAKE) cppcheck
+	@echo "Static code analysis complete. See $(CPPCHECK_LOG) for the results."
+
 FORCE:
 

mercurial