From db3dbb7a9920bd8de31291cd885cd4eb5d3a601f Mon Sep 17 00:00:00 2001 From: akiek <akiek@umich.edu> Date: Mon, 4 Nov 2019 14:35:02 -0500 Subject: [PATCH] Update Makefile to use profile and gprof --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8ac4ba8..5fd9e56 100644 --- a/Makefile +++ b/Makefile @@ -81,10 +81,15 @@ debug: CXXFLAGS += -g3 -DDEBUG debug: $(CXX) $(CXXFLAGS) $(SOURCES) -o $(EXECUTABLE)_debug -# make profile - will compile "all" with $(CXXFLAGS) and the -pg flag -profile: CXXFLAGS += -pg +# make profile - will compile "all" with $(CXXFLAGS) and the -g3 and -O3 flags +profile: CXXFLAGS += -g3 -O3 profile: $(CXX) $(CXXFLAGS) $(SOURCES) -o $(EXECUTABLE)_profile + +# make gprof - will compile "all" with $(CXXFLAGS) and the -pg (for gprof) +gprof: CXXFLAGS += -pg +gprof: + $(CXX) $(CXXFLAGS) $(SOURCES) -o $(EXECUTABLE)_profile # make static - will perform static analysis in the matter currently used # on the autograder -- GitLab