X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=Makefile;h=1b315a7828f4f88c50a758763218f3fc4dfef26b;hb=8e75a34131e9fb04fb44a73f036da2aca872fa95;hp=2fb2f20b44f2cc4e30ed376798c280b14227d37e;hpb=2920b20a7b5315ea09748ca8899d36a236958c59;p=blank.git diff --git a/Makefile b/Makefile index 2fb2f20..1b315a7 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 @@ -11,7 +14,7 @@ TESTLIBS := $(shell pkg-config --libs cppunit) CPPFLAGS ?= CPPFLAGS += $(PKGFLAGS) CXXFLAGS ?= -CXXFLAGS += -Wall +CXXFLAGS += -Wall -Wextra -Werror #CXXFLAGS += -march=native LDXXFLAGS ?= LDXXFLAGS += $(PKGLIBS) @@ -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)