X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=Makefile;h=4a52c99e5e10b957be61f1f0a43c789dd0214130;hb=b3c37033944671429f8db22c3754caef7add1695;hp=2fb2f20b44f2cc4e30ed376798c280b14227d37e;hpb=1b3b7203d0db35236108869961c77eaf31881d4b;p=blank.git diff --git a/Makefile b/Makefile index 2fb2f20..4a52c99 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ CXX = g++ --std=c++11 LDXX = g++ +CPPCHECK = cppcheck -q --std=c++11 \ + --enable=warning,style,performance,portability,unusedFunction,missingInclude \ + --error-exitcode=1 LIBS = sdl2 SDL2_image SDL2_net SDL2_ttf glew openal freealut zlib @@ -151,6 +154,12 @@ codecov: coverage @echo run: codecov.io @bash -c 'bash <(curl -s https://codecov.io/bash) -Z' +lint: + @echo lint: source + @$(CPPCHECK) $(SOURCE_DIR) + @echo lint: tests + @$(CPPCHECK) -I $(SOURCE_DIR) $(TEST_SRC_DIR) + clean: rm -f $(OBJ) rm -f $(DEP) @@ -160,7 +169,7 @@ distclean: clean rm -f $(BIN) cachegrind.out.* callgrind.out.* rm -Rf build client-saves saves -.PHONY: all release cover debug profile tests run gdb cachegrind callgrind test coverage codecov clean distclean +.PHONY: all release cover debug profile tests run gdb cachegrind callgrind test coverage codecov lint clean distclean -include $(DEP)