/
SConstruct
63 lines (46 loc) · 1.52 KB
/
SConstruct
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
import os, sys, time
from glob import glob
ccflags = []
if ARGUMENTS.get('release', '0') == '0':
ccflags += ['-O2', '-g2', '-Werror', '-Wno-deprecated']
else:
ccflags += ['-O2', '-g0', '-Wall', ]
ccdefines = {'_FILE_OFFSET_BITS' : '64', 'DEBUG' : 1, }
env = Environment(CC = 'gcc',
LIBS = ['stdc++', 'm', 'pthread', 'dl', 'rt'],
LIBPATH = ['/usr/lib', '/usr/local/lib', './lib'],
LINKFLAGS = ['-Wl,--no-as-needed','-rdynamic'],
CPPPATH = ['.'])
env.Append(CPPFLAGS = ccflags)
env.Append(CPPDEFINES = ccdefines)
common_source_files = glob('util/impl/*.cc') + \
glob('util/json/impl/*.cc') + \
glob('base/*.cc') + \
glob('base/ccflag/*.cc') + \
glob('base/cclog/*.cc') + \
glob('base/cctest/*.cc')
proxy_common_source_files = glob('proxy/*.cc') + \
glob('proxy/core/*.cc') + \
glob('proxy/lb/*.cc') + \
common_source_files
rpc_source_files = ['rpc.cc'] + \
glob('proxy/rpc/*.cc') + \
proxy_common_source_files
ipc_source_files = ['ipc.cc'] + \
glob('proxy/ipc/*.cc') + \
proxy_common_source_files
test_source_files = glob("test/*.cc") + \
glob("client/*.cc") + \
glob('proxy/*.cc') + \
glob('proxy/ipc/*.cc') + \
glob('proxy/rpc/*.cc') + \
glob('proxy/core/*.cc') + \
common_source_files
#print("mt source code list: >>")
#for s in rpc_source_files:
# print(os.path.realpath(s))
#print('')
env.Program('bin/proxy', rpc_source_files)
env.Program('bin/bus/backend', ipc_source_files)
env.Program('bin/test', test_source_files)
#os.system('mv proxy debug/bin/')