Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
makefile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EECS 281
makefile
Commits
c507a22d
Commit
c507a22d
authored
7 years ago
by
Marcus M. Darden
Browse files
Options
Downloads
Patches
Plain Diff
Change target mac2caen -> sync2caen, lint.
parent
3590c220
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+25
-25
25 additions, 25 deletions
Makefile
with
25 additions
and
25 deletions
Makefile
+
25
−
25
View file @
c507a22d
...
...
@@ -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)
ma
c2caen
:
REMOTE_PATH:="${REMOTE_BASEDIR}/$$(basename `pwd`)"
ma
c2caen
:
syn
c2caen
:
REMOTE_PATH:="${REMOTE_BASEDIR}/$$(basename `pwd`)"
syn
c2caen
:
@
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
ma
c2caen help
fullsubmit
syn
c2caen help
# disable built-in rules
.SUFFIXES
:
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment