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
commit 279173d8fb
2 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View file

@ -13,6 +13,7 @@
*.DS_Store *.DS_Store
romfs/gfx/*.t3x romfs/gfx/*.t3x
include/version.hpp include/version.hpp
cppcheck.log
bannertool* bannertool*
makerom* makerom*

View file

@ -220,7 +220,7 @@ ifneq ($(ROMFS),)
export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS) export _3DSXFLAGS += --romfs=$(CURDIR)/$(ROMFS)
endif endif
.PHONY: all clean .PHONY: all clean cppcheck
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES) all: $(BUILD) $(GFXBUILD) $(DEPSDIR) $(ROMFS_T3XFILES) $(T3XHFILES)
@ -320,4 +320,9 @@ endef
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
endif 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...