forked from tyrdbs/tyrdbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.scons
52 lines (37 loc) · 1.11 KB
/
build.scons
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
Import('env')
env['CC'] = 'clang'
env['CXX'] = 'clang++'
env['AS'] = 'clang'
env['LINK'] = 'clang++'
env['CCFLAGS'] = '-Wall -pedantic -Wno-unused-function -Wno-gnu-statement-expression'
env['CXXFLAGS'] = '-std=c++17'
env['ASFLAGS'] = '-c'
env['LINKFLAGS'] = '-pthread -ldl'
env.Append(CPPPATH='#')
if env['profile']:
env.Append(CCFLAGS=' -pg')
env.Append(LINKFLAGS=' -pg')
if env['debug']:
env.Append(CCFLAGS=' -O0 -g -fno-limit-debug-info')
env.Append(CPPDEFINES='DEBUG')
else:
env.Append(CCFLAGS=' -O3')
if not env['profile']:
env.Append(CCFLAGS=' -fomit-frame-pointer')
env.Append(LINKFLAGS=' -s')
else:
env.Append(CCFLAGS=' -g')
if not env['asserts']:
env.Append(CPPDEFINES='NDEBUG')
if not env['verbose']:
env['ASCOMSTR'] = "AS $TARGET"
env['CXXCOMSTR'] = "CXX $TARGET"
env['CCCOMSTR'] = "CC $TARGET"
env['ARCOMSTR'] = "AR $TARGET"
env['RANLIBCOMSTR'] = "RANLIB $TARGET"
env['LINKCOMSTR'] = "LINK $TARGET"
scripts = [
'tyrtech/build.scons',
'tests/build.scons'
]
env.SConscript(scripts, must_exist=1)