-
Notifications
You must be signed in to change notification settings - Fork 2
/
SConscript
39 lines (31 loc) · 1.26 KB
/
SConscript
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
import os
Import('env')
debug = ARGUMENTS.get('debug', 1)
gflags_version = ARGUMENTS.get('gflags_ver', 1)
Help('this is a platform-cross builder\n debug=[0|1] gflags_ver=[1|2]')
#LINKFLAGS
if int(debug) != 0:
env.Append(CPPDEFINES='_DEBUG')
else:
env.Append(CPPDEFINES='NDEBUG')
if int(gflags_version) != 1:
env.Append(CPPDEFINES='GFLAGS_NS_GOOGLE')
#rapidapp lib
SConscript('framework/SConscript')
#connector
SConscript('server/connector/SConscript')
#sample
SConscript('sample/SConscript')
#echosvr
os.system('echo \'genereate c++ code over protobuf [echosvr.proto]...\' && cd tools/echosvr && protoc --cpp_out=. echosvr.proto')
tools_echosvr_src = Glob('tools/echosvr/*.cpp')
tools_echosvr_src += Glob('./lib/librapidapp.a')
env.Program('tools/echo_svr', tools_echosvr_src, LIBS=['event', 'glog', 'gflags', 'protobuf', 'pthread'])
#install to sdk
env.Install('sdk/', 'utils/tsocket_util.cpp')
env.Install('sdk/', 'utils/tsocket_util.h')
env.Install('sdk/', 'utils/tcp_socket.c')
env.Install('sdk/', 'utils/tcp_socket.h')
env.Install('sdk/', Glob('server/connector/client_api/cocos_lua/cocos_connector.*'))
env.Install('sdk/', Glob('server/connector/client_api/connector_client_api*.cpp'))
env.Install('sdk/', Glob('server/connector/client_api/connector_client_api*.h'))