-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_public
executable file
·72 lines (56 loc) · 2.1 KB
/
Makefile_public
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
############################################################
#some variables
############################################################
CC = gcc
CXX = g++
CPP = g++
AR = ar
###########################################################
#some flags
###########################################################
ARFLAGS = cr
tmp=$(shell svn up)
svnver=`svn info | grep Revision| cut -d " " -f 2`
svndir=`svn info | grep URL| cut -d " " -f 2`
ifeq ($(mode),d)
CPPFLAGS= -g -fPIC -Wall -DDEBUG $(INC) -Wno-invalid-offsetof -std=c++0x
LDFLAGS = -g -fPIC -L$(LIB_DIR) -llightframe -lcommon -lauth -L$(TINYXML_LIB_DIR) -ltinyxml -lmysqlclient
else
CPPFLAGS= -g -fPIC -Wall $(INC) -Wno-invalid-offsetof -std=c++0x
LDFLAGS = -g -fPIC -L$(LIB_DIR) -llightframe -lcommon -lauth -L$(TINYXML_LIB_DIR) -ltinyxml -L$(MYSQL_LIB_DIR) -lmysqlclient
endif
###########################################################
#some path definition
###########################################################
BASE_DIR= ${HOME}/develop/server
#BASE_DIR= d:\develop\workspace\server
MYSQL_INCLUDE_DIR = /usr/include
LUA_INCLUDE_DIR = $(BASE_DIR)/lua/include
LIGHTFRAME_INCLUDE_DIR = $(BASE_DIR)/lightframe
PUBLIC_INCLUDE_DIR = $(BASE_DIR)/public
DEBUG_LIB_DIR = $(BASE_DIR)/lib/Debug
RELEASE_LIB_DIR = $(BASE_DIR)/lib/Release
ifeq ($(mode),d)
LIB_DIR = $(DEBUG_LIB_DIR)
BIN_DIR = $(BASE_DIR)/bin/Debug
BIN_SUFFIX = _dbg
else
LIB_DIR = $(RELEASE_LIB_DIR)
BIN_DIR = $(BASE_DIR)/bin/Release
endif
OBJ_DIR = ./.objs
MYSQL_LIB_DIR = /usr/lib64/mysql
TINYXML_LIB_DIR = $(BASE_DIR)/lightframe/tinyxml
LUA_LIB_DIR = $(BASE_DIR)/lua/src
COMMON_DIR = $(BASE_DIR)/lightframe/common
LIGHTFRAME_DIR = $(BASE_DIR)/lightframe
AUTH_DIR = $(BASE_DIR)/lightframe/auth
UTILS_DIR= $(BASE_DIR)/lightframe/utils
LZMA_DIR= $(BASE_DIR)/lightframe/lzma
LUA_DIR = $(BASE_DIR)/lua/src
COMMON_LIB = $(LIB_DIR)/libcommon.a
AUTH_LIB = $(LIB_DIR)/libauth.a
UTILS_LIB=$(LIB_DIR)/libutils.a
LZMA_LIB=$(LIB_DIR)/liblzma.a
LIGHTFRAME_LIB=$(LIB_DIR)/liblightframe.a
SRC = $(wildcard *.cpp) $(wildcard *.c) $(wildcard *.cxx)