From 279173d8fbdc7c063309007362fa0613c873ede4 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Sat, 27 Mar 2021 18:04:11 -0500 Subject: [PATCH] Add cppcheck to Makefile So you can run "make cppcheck" if you want to run it, it needs the $INCLUDE so it's nice in the makefile, and it doesn't affect the rest of building --- .gitignore | 1 + Makefile | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 931fee6..4e744df 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.DS_Store romfs/gfx/*.t3x include/version.hpp +cppcheck.log bannertool* makerom* diff --git a/Makefile b/Makefile index da6cae6..ba1b081 100644 --- a/Makefile +++ b/Makefile @@ -220,7 +220,7 @@ ifneq ($(ROMFS),) export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS) endif -.PHONY: all clean +.PHONY: all clean cppcheck #--------------------------------------------------------------------------------- all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES) @@ -320,4 +320,9 @@ endef #--------------------------------------------------------------------------------------- endif -#--------------------------------------------------------------------------------------- \ No newline at end of file +#--------------------------------------------------------------------------------------- + +cppcheck: + @rm -f cppcheck.log + @cppcheck . --enable=all $(INCLUDE) -UJSON_CATCH_USER -U_Check_return_ -U_MSC_VER -U_Ret_notnull_ -U__INTEL_COMPILER -U__PGI -U__SUNPRO_CC -UJSON_INTERNAL_CATCH_USER -UJSON_THROW_USER -UJSON_TRY_USER -U__IBMCPP__ -U__SUNPRO_CC -D__GNUC__=9 -D__GNUC_MINOR__=1 -DNULL=nullptr --force 2> cppcheck.log + @echo cppcheck.log file created...