-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
42 lines (32 loc) · 1.35 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
import os
import sys
env=Environment()
# default build options
env.Replace(CFLAGS=" -fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 ")
env.Replace(CXXFLAGS=" -fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 ")
env.Replace(LINKFLAGS="-fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 -Wl,-unresolved-symbols=ignore-in-shared-libs ")
env.Replace(SHLINKFLAGS="-fPIC -fmax-errors=2 -Wall -Werror -fmax-errors=2 -shared ") # default is ignore all link errors
# parse arguments into env and set default values.
env.Replace(SECURITY_TRANSFORMS_HOME=os.environ['SECURITY_TRANSFORMS_HOME'])
env.Replace(IRDB_SDK=os.environ['IRDB_SDK'])
env.Replace(SMPSA_HOME=os.environ['SMPSA_HOME'])
env.Replace(PEASOUP_HOME=os.environ['PEASOUP_HOME'])
env.Replace(debug=ARGUMENTS.get("debug",0))
env.Replace(PEDI_HOME=os.environ['PEDI_HOME'])
env.Replace(ZIPR_PLUGIN_PATH=os.environ['ZIPR_PLUGIN_PATH'])
if int(env['debug']) == 1:
print("Setting debug mode")
env.Append(CFLAGS=" -g ")
env.Append(CXXFLAGS=" -g ")
env.Append(LINKFLAGS=" -g ")
env.Append(SHLINKFLAGS=" -g ")
else:
print("Setting release mode")
env.Append(CFLAGS=" -O ")
env.Append(CXXFLAGS=" -O ")
env.Append(LINKFLAGS=" -O ")
env.Append(SHLINKFLAGS=" -O ")
Export('env')
ret=SConscript("SConscript")
Default(ret)
Return('ret')