Skip to content
Snippets Groups Projects
Commit c507a22d authored by Marcus M. Darden's avatar Marcus M. Darden
Browse files

Change target mac2caen -> sync2caen, lint.

parent 3590c220
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,11 @@ REMOTE_BASEDIR := eecs281
# TODO
# Change EXECUTABLE to match the command name given in the project spec.
EXECUTABLE = executable
EXECUTABLE = zookeeper
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)
......@@ -83,7 +83,7 @@ profile: clean all
# on the autograder
static:
cppcheck --enable=all --suppress=missingIncludeSystem \
$(SOURCES) *.h *.hpp
$(SOURCES) *.h *.hpp
# Build both release and debug executables
all: clean
......@@ -123,24 +123,24 @@ alltests: clean $(TESTS)
# make clean - remove .o files, executables, tarball
clean:
rm -f $(OBJECTS) $(EXECUTABLE) $(DEBUG) $(TESTS) \
$(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(PERF_FILE)
$(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(PERF_FILE)
rm -Rf *.dSYM
# make partialsubmit.tar.gz - cleans, runs dos2unix, creates tarball
# omitting test cases
PARTIAL_SUBMITFILES=$(filter-out $(TESTSOURCES), \
$(wildcard Makefile *.h *.hpp *.cpp))
$(wildcard Makefile *.h *.hpp *.cpp))
$(PARTIAL_SUBMITFILE): $(PARTIAL_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE)
-dos2unix $(PARTIAL_SUBMITFILES)
COPYFILE_DISABLE=true tar -vczf $(PARTIAL_SUBMITFILE) \
$(PARTIAL_SUBMITFILES)
$(PARTIAL_SUBMITFILES)
@echo !!! WARNING: No test cases included. Use 'make fullsubmit' to include test cases. !!!
# make fullsubmit.tar.gz - cleans, runs dos2unix, creates tarball
# including test cases
FULL_SUBMITFILES=$(filter-out $(TESTSOURCES), \
$(wildcard Makefile *.h *.hpp *.cpp test*.txt))
$(wildcard Makefile *.h *.hpp *.cpp test*.txt))
$(FULL_SUBMITFILE): $(FULL_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE)
-dos2unix $(FULL_SUBMITFILES)
......@@ -151,33 +151,33 @@ $(FULL_SUBMITFILE): $(FULL_SUBMITFILES)
partialsubmit: $(PARTIAL_SUBMITFILE)
fullsubmit: $(FULL_SUBMITFILE)
mac2caen: REMOTE_PATH:="${REMOTE_BASEDIR}/$$(basename `pwd`)"
mac2caen:
sync2caen: REMOTE_PATH:="${REMOTE_BASEDIR}/$$(basename `pwd`)"
sync2caen:
@echo "Build time: `date`" > rsync.log
@open rsync.log
@-open rsync.log
# Make target directory on CAEN server
@echo "Making remote target directory ... ${REMOTE_PATH}" \
>> rsync.log
>> rsync.log
@ssh login.engin.umich.edu "mkdir -p ${REMOTE_PATH}" \
>> rsync.log
>> rsync.log
# Synchronize local files into target directory on CAEN
@echo "Synchronizing local files to CAEN ..." \
>> rsync.log
>> rsync.log
@rsync \
-av \
--delete \
-av \
--delete \
--exclude '.git*' \
--exclude 'rsync.log' \
--exclude '.DS_Store' \
--exclude '.DS_Store' \
--filter=":- .gitignore" \
./ \
"login.engin.umich.edu:${REMOTE_PATH}/" \
>> rsync.log
./ \
"login.engin.umich.edu:${REMOTE_PATH}/" \
>> rsync.log
# Do remote builds
@echo "Making remote executables with \"make all\" ..." \
>> rsync.log
>> rsync.log
@ssh login.engin.umich.edu "cd ${REMOTE_PATH} && make all" \
>> rsync.log
>> rsync.log
define MAKEFILE_HELP
EECS281 Advanced Makefile Help
......@@ -265,6 +265,6 @@ help:
# these targets do not create any files
.PHONY: all release debug profile static clean alltests partialsubmit \
fullsubmit mac2caen help
fullsubmit sync2caen help
# disable built-in rules
.SUFFIXES:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment