-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
32 lines (22 loc) · 896 Bytes
/
makefile
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++17
All: all
all: main GameTesterMain
main: main.cpp Game.o
$(CXX) $(CXXFLAGS) main.cpp Game.o -o main
# The -c command produces the object file
Game.o: Game.cpp Game.h
$(CXX) $(CXXFLAGS) -c Game.cpp -o Game.o
GameTesterMain: GameTesterMain.cpp Game.o GameTester.o
$(CXX) $(CXXFLAGS) GameTesterMain.cpp Game.o GameTester.o -o GameTesterMain
GameTester.o: GameTester.cpp GameTester.h
$(CXX) $(CXXFLAGS) -c GameTester.cpp -o GameTester.o
# Some cleanup functions, invoked by typing "make clean" or "make deepclean"
deepclean:
rm -f *~ *.o GameTesterMain main main.exe *.stackdump
clean:
rm -f *~ *.o *.stackdump