From 0a364131991ea7dc479f4fcb1c730f5e96dc5335 Mon Sep 17 00:00:00 2001 From: "Marcus M. Darden" <mmdarden@umich.edu> Date: Mon, 4 Sep 2017 00:23:08 -0400 Subject: [PATCH] Add "make static" for static analysis testing. --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ecb927d..c8cbc93 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ LD_RUN_PATH := /usr/um/gcc-6.2.0/lib64 # TODO # Change EXECUTABLE to match the command name given in the project spec. -EXECUTABLE = project0 +EXECUTABLE = executable DEBUG = $(EXECUTABLE)_debug # designate which compiler to use @@ -70,6 +70,11 @@ debug: clean all profile: CXXFLAGS += -pg profile: clean all +# make static - will perform static analysis in the matter currently used +# on the autograder +static: + cppcheck --enable=all --suppress=missingIncludeSystem *.c* *.h* + # highest target; sews together all objects into executable all: $(EXECUTABLE) @@ -161,6 +166,11 @@ EECS281 Advanced Makefile Help C) If test drivers need special dependencies, they must be added manually. D) IMPORTANT: NO SOURCE FILES THAT BEGIN WITH test WILL BE ADDED TO ANY SUBMISSION TARBALLS. + +* Static Analysis support + A) Matches current autograder style grading tests + B) Usage: + $$ make static endef export MAKEFILE_HELP @@ -195,6 +205,6 @@ help: ###################### # these targets do not create any files -.PHONY: all release debug profile clean alltests partialsubmit fullsubmit help +.PHONY: all release debug profile static clean alltests partialsubmit fullsubmit help # disable built-in rules .SUFFIXES: -- GitLab