-
Notifications
You must be signed in to change notification settings - Fork 5
/
SConstruct
50 lines (44 loc) · 1010 Bytes
/
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
#this comment is just for highlight
import os
cc='g++'
cc_flags=['-g','-O2','-Wall', '-std=gnu++98']
libs = ['m', 'pthread']
lib_path = []
link_flags = []
include_path = [
'include',
'FastCGI',
'thrift',
'thrift/concurrency',
'thrift/processor',
'thrift/protocol',
'thrift/server',
'thrift/transport',
]
source_path = [
'src',
'thrift',
'FastCGI',
'thrift/concurrency',
'thrift/processor',
'thrift/protocol',
'thrift/server',
'thrift/transport',
]
def get_all_source_files():
objs = []
for path in source_path:
for file in os.listdir(path):
if (file[-3:] != ".cc" and file[-4:] != ".cpp") or file[-7:] == "test.cc":
continue
objs.append(path + "/" + file)
return objs
all_source_files = get_all_source_files()
env = Environment()
env.Append(CC = cc)
env.Append(CCFLAGS = cc_flags)
env.Append(CPPPATH = include_path)
env.Append(LIBS = libs)
env.Append(LIBPATH = lib_path)
env.Append(LINKFLAGS = link_flags)
env.Program('GI', all_source_files)