Commit 160d9ae4 authored by Marcus M. Darden's avatar Marcus M. Darden
Browse files

Clarify the common targets and their actions.

Slightly edited these targets (release, debug, all) for consistency.
Also picked some nits in comments and 'make help'.
parent 3a868c3c
......@@ -48,7 +48,7 @@ PROJECTFILE = $(or $(wildcard project*.cpp), nomain.cpp)
# If main() is in another file delete the line above, edit and uncomment below
#PROJECTFILE = mymainfile.cpp
# name of the tar ball created for submission
# name of the tarball created for submission
PARTIAL_SUBMITFILE = partialsubmit.tar.gz
FULL_SUBMITFILE = fullsubmit.tar.gz
......@@ -61,13 +61,13 @@ CXXFLAGS = -std=c++1z -Wconversion -Wall -Werror -Wextra -pedantic
# make release - will compile "all" with $(CXXFLAGS) and the -O3 flag
# also defines NDEBUG so that asserts will not check
release: CXXFLAGS += -O3 -DNDEBUG
release: all
release: $(EXECUTABLE)
# make debug - will compile "all" with $(CXXFLAGS) and the -g flag
# also defines DEBUG so that "#ifdef DEBUG /*...*/ #endif" works
debug: EXECUTABLE := $(DEBUG)
debug: CXXFLAGS += -g3 -DDEBUG
debug: clean all
debug: clean $(EXECUTABLE)
# make profile - will compile "all" with $(CXXFLAGS) and the -pg flag
profile: CXXFLAGS += -pg
......@@ -78,8 +78,10 @@ profile: clean all
static:
cppcheck --enable=all --suppress=missingIncludeSystem $(SOURCES) *.h *.hpp
# highest target; sews together all objects into executable
all: $(EXECUTABLE)
# Build both release and debug executables
all: clean
make -Rr release
make debug
$(EXECUTABLE): $(OBJECTS)
ifeq ($(EXECUTABLE), executable)
......@@ -167,8 +169,8 @@ EECS281 Advanced Makefile Help
$$ make test3
$$ make alltests (this builds all test drivers)
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.
D) IMPORTANT: NO SOURCE FILES WITH NAMES THAT BEGIN WITH test WILL BE
ADDED TO ANY SUBMISSION TARBALLS.
* Static Analysis support
A) Matches current autograder style grading tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment