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
This commit is contained in:
Pk11
2021-03-27 18:04:11 -05:00
parent 2825e361e3
commit 279173d8fb
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@
*.DS_Store
romfs/gfx/*.t3x
include/version.hpp
cppcheck.log
bannertool*
makerom*
+6 -1
View File
@@ -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)
@@ -321,3 +321,8 @@ endef
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
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...