diff --git a/Makefile b/Makefile index d09924c5f5e06bb14e7c4b9fda526e6325bde7bb..4077b4e6cb6728817edea359908cce5c1d3f16f4 100644 --- a/Makefile +++ b/Makefile @@ -25,16 +25,16 @@ LD_RUN_PATH := /usr/um/gcc-6.2.0/lib64 # This is the path from the CAEN home folder to where projects will be # uploaded. (eg. /home/mmdarden/eecs281/project1) # Change this if you prefer a different path. -# REMOTE_BASEDIR := w18/eecs281 # /home/mmdarden/w18/eecs281/project0 -REMOTE_BASEDIR := eecs281 +# REMOTE_BASEDIR := w18/eecs281 # /home/mmdarden/w18/eecs281/project0 +REMOTE_BASEDIR := eecs281 # TODO # Change EXECUTABLE to match the command name given in the project spec. -EXECUTABLE = zookeeper +EXECUTABLE = executable DEBUG = $(EXECUTABLE)_debug # designate which compiler to use -CXX = g++ +CXX = g++ # list of test drivers (with main()) for development TESTSOURCES = $(wildcard test*.cpp) @@ -42,10 +42,10 @@ TESTSOURCES = $(wildcard test*.cpp) TESTS = $(TESTSOURCES:%.cpp=%) # list of sources used in project -SOURCES = $(wildcard *.cpp) +SOURCES = $(wildcard *.cpp) SOURCES := $(filter-out $(TESTSOURCES), $(SOURCES)) # list of objects used in project -OBJECTS = $(SOURCES:%.cpp=%.o) +OBJECTS = $(SOURCES:%.cpp=%.o) # TODO # If main() is in a file named project*.cpp, use the following line @@ -65,7 +65,7 @@ PERF_FILE = perf.data* 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 +# also defines NDEBUG so that asserts will not check release: CXXFLAGS += -O3 -DNDEBUG release: $(EXECUTABLE) @@ -186,8 +186,7 @@ EECS281 Advanced Makefile Help * General usage 1. Follow directions at each "TODO" in this file. - a. Set EXECUTABLE equal to the name given in the project - specification. + a. Set EXECUTABLE equal to the name from the project specification. b. Set PROJECTFILE equal to the name of the source file with main() c. Add any dependency rules specific to your files. 2. Build, test, submit... repeat as necessary. @@ -252,12 +251,18 @@ help: # myclass.o: myclass.cpp myclass.h $(HEADERS) # project5.o: project5.cpp myclass.o $(HEADERS) # -# ADD YOUR OWN DEPENDENCIES HERE - +# SOME EXAMPLES +# #test_thing: test_thing.cpp class.o functions.o #class.o: class.cpp class.h #functions.o: functions.cpp functions.h #project0.o: project0.cpp class.h functions.h +# +# THE COMPILER CAN GENERATE DEPENDENCIES FROM SOURCE CODE +# +# % g++ -MM *.cpp +# +# ADD YOUR OWN DEPENDENCIES HERE ###################### # TODO (end) #