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
a3d59839
Commit
a3d59839
authored
7 years ago
by
Marcus M. Darden
Browse files
Options
Downloads
Patches
Plain Diff
Lint and update comments.
parent
c507a22d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+16
-11
16 additions, 11 deletions
Makefile
with
16 additions
and
11 deletions
Makefile
+
16
−
11
View file @
a3d59839
...
...
@@ -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) #
...
...
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