-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (38 loc) · 1.73 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#CC specifies which compiler we're using
CXX = g++
#OBJS specifies which files to compile as part of the project
OBJS = Button.o collision.o Game.o main.o MainMenu.o MessageStructs.o MyTexture.o MyWindow.o Player.o Screen.o Text.o TextInput.o Tile.o TileAtlas.o Timer.o SoundEffect.o Entity.o Animation.o NPC.o # SearchOpponent.o
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppresses all warnings
COMPILER_FLAGS = -g
#LINKER_FLAGS specifies the libraries we're linking against
LINKER_FLAGS = -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer
#OBJ_NAME specifies the name of our exectuable
OBJ_NAME = game.out
#This is the target that compiles our executable
all : Client Server
Client: $(OBJS)
$(CXX) $(OBJS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)
Button.o: MyWindow.h
collision.o:
Game.o: Tile.h Player.h MyTexture.h TileAtlas.h TileAtlas.h Renderable.h Entity.h Text.h Timer.h Screen.h constants.h MyWindow.h NPC.o
main.o: MyWindow.h Game.h MainMenu.h
MainMenu.o: Screen.h Game.h TextInput.h MyWindow.h Button.h
MessageStructs.o: MessageStructs.h
MyTexture.o:
MyWindow.o: MyTexture.h Text.h Renderable.h constants.h Screen.h
Player.o: Tile.h MyTexture.h Renderable.h MyWindow.h SoundEffect.h Timer.h utilities.h Animation.h constants.h Game.h
Screen.o: MyWindow.h
Text.o: MyTexture.h MyWindow.h
TextInput.o: MyWindow.h
Tile.o: MyTexture.h Renderable.h collision.h TileAtlas.h Game.h
TileAtlas.o:
Timer.o:
SoundEffect.o:
Entity.o: Player.h
Animation.o: Renderable.h MyTexture.h
NPC.o: Renderable.h Game.h MyTexture.h Timer.h
Server: server/server.cpp MessageStructs.cpp
$(CXX) server/server.cpp MessageStructs.cpp $(COMPILER_FLAGS) -o server/server.out
clean:
rm *.o server/server.out $(OBJ_NAME)