-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
116 lines (98 loc) · 2.68 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
CC = g++
NAME = bomberman
SRCSDIR = srcs
GAMEDIR = $(SRCSDIR)/game/
MISCDIR = $(SRCSDIR)/misc/
COREDIR = $(SRCSDIR)/core/
EXCEPTDIR = $(SRCSDIR)/exceptions/
BUFFDIR = $(GAMEDIR)/buffs/
BOMBDIR = $(GAMEDIR)/bombs/
VENDORSDIR = $(SRCSDIR)/vendors/
GDLDIR = $(VENDORSDIR)/LibBomberman_linux_x64/
LUADIR = $(VENDORSDIR)/lua-5.3.0/
LUABDIR = $(VENDORSDIR)/LuaBridge/
RJSONDIR = $(VENDORSDIR)/rapidjson/
LUAINCS = $(LUADIR)/include/
CORESRCS = main.cpp \
Asset3d.cpp \
Object3d.cpp \
CameraObject.cpp \
JSONDoc.cpp \
ScoreList.cpp \
MapList.cpp \
Animation.cpp \
Core.cpp \
AMenuObject.cpp \
MenuGrid.cpp \
Text2d.cpp \
View2d.cpp \
GAMESRCS = Player.cpp \
Gamer.cpp \
PlayerAI.cpp \
BuffTimer.cpp \
Empty.cpp \
Map.cpp \
AIStateMap.cpp \
RessourceStock.cpp \
BombTimer.cpp \
Spawn.cpp \
Wall.cpp \
DestroyableWall.cpp \
IObject.cpp \
Color.cpp \
Fire.cpp \
Score.cpp \
Sound.cpp \
BUFFSRCS = BuffDecSpeed.cpp \
BuffFactory.cpp \
BuffIncBomb.cpp \
BuffIncSpeed.cpp \
BuffNoBomb.cpp \
BuffWeapon.cpp \
BuffParalyzed.cpp \
BuffShield.cpp \
BuffIncRange.cpp \
IBuff.cpp \
BOMBSRCS = BombClassic.cpp \
BombVirus.cpp \
IBomb.cpp \
BombMine.cpp \
BombBarrel.cpp \
BombFactory.cpp \
MISCSRCS = Timer.cpp \
my_random.cpp \
StringConversion.cpp \
LuaScript.cpp \
EXCEPTSRCS = ResourceUnavailable.cpp \
LuaError.cpp \
InvalidNbPlayers.cpp \
InvalidDimensions.cpp \
CondVarError.cpp \
MutexError.cpp \
ThreadError.cpp \
SafeQueueFinished.cpp \
SRCS += $(addprefix $(COREDIR), $(CORESRCS))
SRCS += $(addprefix $(GAMEDIR), $(GAMESRCS))
SRCS += $(addprefix $(MISCDIR), $(MISCSRCS))
SRCS += $(addprefix $(BUFFDIR), $(BUFFSRCS))
SRCS += $(addprefix $(BOMBDIR), $(BOMBSRCS))
SRCS += $(addprefix $(THREADDIR), $(THREADSRCS))
SRCS += $(addprefix $(EXCEPTDIR), $(EXCEPTSRCS))
OBJS = $(SRCS:.cpp=.o)
CXXFLAGS += -W -Wall -Werror -Wextra -std=c++11 -O3 -march=native
CXXFLAGS += -ftree-vectorize -ffast-math
CXXFLAGS += -I./$(SRCSDIR) -I./$(GAMEDIR) -I./$(COREDIR) -I./$(BOMBDIR)
CXXFLAGS += -I./$(MISCDIR) -I./$(BUFFDIR) -I./$(EXCEPTDIR) -I./srcs/server/
CXXFLAGS += -I./$(GDLDIR)/includes/ -I./$(RJSONDIR)
CXXFLAGS += -I./$(LUABDIR) -I./$(LUABDIR)/detail -I./$(LUAINCS) -I./$(THREADDIR)
LDFLAGS += -L $(GDLDIR)/libs/ -L $(LUADIR)/lib
LDFLAGS += -pthread -lgdl_gl -lGL -lGLEW -lrt -lfbxsdk -lSDL -lSDL2 -ldl -llua -lvlc
all: $(NAME)
$(NAME): $(OBJS)
$(CC) -o $(NAME) $(OBJS) $(LDFLAGS)
clean:
rm -f $(OBJS)
fclean: clean
rm -f $(NAME)
re: fclean all
.PHONY: all clean fclean re