-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
51 lines (36 loc) · 1.57 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
CXX = g++ -std=c++17
CXXFLAGS = -g -w -Wall
LIBS = -luser32 -lgdi32 -lopengl32 -lgdiplus -lShlwapi -ldwmapi -lstdc++fs -static -lwinmm
LIBPATH = libs/olcPixelGameEngine.h libs/olcPGEX_AnimatedSprite.h libs/olcPGEX_TransformedView.h
EXECUTABLE = main.exe
MAIN = main.cpp
SRC = src
INCLUDE = include
FE = frontend
BE = backend
LOG = logger
all: main
main: gameManager menu lobby uncheckedMaze mazeChecker room player collisions $(MAIN)
$(CXX) $(CXXFLAGS) -o $(EXECUTABLE) $(MAIN) gameManager.o mainMenu.o lobby.o maze.o checkedMaze.o room.o player.o collisions.o $(LIBS)
./$(EXECUTABLE)
gameManager: $(SRC)/$(BE)/gameManager.cpp $(INCLUDE)/$(BE)/gameManager.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(BE)/gameManager.cpp
menu: $(SRC)/$(FE)/mainMenu.cpp $(INCLUDE)/$(FE)/mainMenu.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(FE)/mainMenu.cpp
lobby: $(SRC)/$(FE)/lobby.cpp $(INCLUDE)/$(FE)/lobby.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(FE)/lobby.cpp
room: $(SRC)/$(FE)/room.cpp $(INCLUDE)/$(FE)/room.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(FE)/room.cpp
player: $(SRC)/$(FE)/player.cpp $(INCLUDE)/$(FE)/player.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(FE)/player.cpp
collisions: $(SRC)/$(BE)/collisions.cpp $(INCLUDE)/$(BE)/collisions.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(BE)/collisions.cpp
maze: uncheckedMaze mazeChecker
$(CXX) $(CXXFLAGS) -o maze.exe maze.o checkedMaze.o
./maze.exe
mazeChecker: $(SRC)/$(BE)/checkedMaze.cpp $(INCLUDE)/$(BE)/checkedMaze.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(BE)/checkedMaze.cpp
uncheckedMaze: $(SRC)/$(BE)/maze.cpp $(INCLUDE)/$(BE)/maze.h
$(CXX) $(CXXFLAGS) -c $(SRC)/$(BE)/maze.cpp
clean:
rm *.exe *.o