-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile_public
71 lines (55 loc) · 2.01 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
############################################################
#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
LDFLAGS = -g -fPIC -L$(LIB_DIR) -lfastframe -lcommon -L$(TINYXML_LIB_DIR) -ltinyxml -lmysqlclient
else
CPPFLAGS= -g -fPIC -Wall $(INC) -Wno-invalid-offsetof
LDFLAGS = -g -fPIC -L$(LIB_DIR) -lfastframe -lcommon -L$(TINYXML_LIB_DIR) -ltinyxml -L$(MYSQL_LIB_DIR) -lmysqlclient
endif
###########################################################
#some path definition
###########################################################
BASE_DIR= /mnt/hgfs/workspace
MYSQL_INCLUDE_DIR = /usr/include
LUA_INCLUDE_DIR = $(BASE_DIR)/lua/include
FASTFRAME_INCLUDE_DIR = $(BASE_DIR)/fastframe
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)/fastframe/tinyxml
LUA_LIB_DIR = $(BASE_DIR)/lua/src
COMMON_DIR = $(BASE_DIR)/fastframe/common
FASTFRAME_DIR = $(BASE_DIR)/fastframe
AUTH_DIR = $(BASE_DIR)/fastframe/auth
UTILS_DIR= $(BASE_DIR)/fastframe/utils
LZMA_DIR= $(BASE_DIR)/fastframe/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
FASTFRAME_LIB=$(LIB_DIR)/libfastframe.a
SRC = $(wildcard *.cpp) $(wildcard *.c) $(wildcard *.cxx)