forked from tomdev2008/gateserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·66 lines (50 loc) · 1.56 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
include ../lightframe/Makefile_public
GATESERVER_DIR = $(BASE_DIR)/gateserver
GATESERVER_INCLUDE_DIR = $(GATESERVER_DIR)
BLL_DIR = bll
CTL_DIR = ctl
DAL_DIR = dal
DEF_DIR = def
CONFIG_DIR = config
GATESERVER_OBJ_DIR = $(GATESERVER_DIR)/.objs
GATESERVER_LDFLAGS = $(LDFLAGS) -ldl -lpthread
TARGET = $(DEBUG_TARGET)
DEBUG_TARGET = $(BIN_DIR)/vdc_gateserver$(BIN_SUFFIX)
GATESERVER_SRC = $(wildcard *.cpp)
DAL_SRC = $(wildcard $(DAL_DIR)/*.cpp)
DEF_SRC = $(wildcard $(DEF_DIR)/*.cpp)
CTL_SRC = $(wildcard $(CTL_DIR)/*.cpp)
BLL_SRC = $(wildcard $(BLL_DIR)/*.cpp)
CONFIG_SRC = $(wildcard $(CONFIG_DIR)/*.cpp)
TEST_SRC = $(wildcard $(TEST_DIR)/*.cpp)
GATESERVER_OBJS = $(addprefix $(GATESERVER_OBJ_DIR)/, $(subst .cpp,.o,$(GATESERVER_SRC)))
OBJS = $(wildcard $(GATESERVER_OBJ_DIR)/*.o)
INC = -I$(LIGHTFRAME_INCLUDE_DIR) -I$(GATESERVER_INCLUDE_DIR) -I$(PUBLIC_INCLUDE_DIR)
all : $(TARGET)
$(TARGET) : $(GATESERVER_OBJS) COMMON LIGHTFRAME DAL DEF CTL BLL CONFIG
$(CXX) -o $@ $(OBJS) $(GATESERVER_LDFLAGS)
$(GATESERVER_OBJ_DIR)/%.o : %.cpp
$(CXX) $(CPPFLAGS) -c $< -o $@
COMMON:
cd $(COMMON_DIR); make
DAL:
cd $(DAL_DIR); make
DEF:
cd $(DEF_DIR); make
CTL:
cd $(CTL_DIR); make
BLL:
cd $(BLL_DIR); make
CONFIG:
cd $(CONFIG_DIR); make
LIGHTFRAME:
cd $(LIGHTFRAME_DIR); make
clean:
cd $(COMMON_DIR); make clean;
cd $(LIGHTFRAME_DIR); make clean;
cd $(CONFIG_DIR); make clean;
cd $(DAL_DIR); make clean;
cd $(DEF_DIR); make clean;
cd $(CTL_DIR); make clean;
cd $(BLL_DIR); make clean;
rm -f $(OBJS) $(TARGET)