-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
32 lines (22 loc) · 984 Bytes
/
makefile
File metadata and controls
32 lines (22 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# The following just specifies some variables for "flexibility".
# Specify the C++ compiler
CXX = g++
# Specify options to pass to the compiler. Here it sets the optimisation
# level, outputs debugging info for gdb, and C++ version to use.
CXXFLAGS = -O0 -g3 -std=c++14
All: all
all: main GeometryTesterMain
main: main.cpp Geometry.o
$(CXX) $(CXXFLAGS) main.cpp Geometry.o -o main
GeometryTesterMain: GeometryTesterMain.cpp GeometryTester.o Geometry.o
$(CXX) $(CXXFLAGS) GeometryTesterMain.cpp GeometryTester.o Geometry.o -o GeometryTesterMain
# The -c command produces the object file
Geometry.o: Geometry.cpp Geometry.h
$(CXX) $(CXXFLAGS) -c Geometry.cpp -o Geometry.o
GeometryTester.o: GeometryTester.cpp GeometryTester.h
$(CXX) $(CXXFLAGS) -c GeometryTester.cpp -o GeometryTester.o
# Some cleanup functions, invoked by typing "make clean" or "make deepclean"
deepclean:
rm -f *~ *.o GeometryTesterMain main main.exe *.stackdump
clean:
rm -f *~ *.o *.stackdump