-
Notifications
You must be signed in to change notification settings - Fork 304
/
Copy pathSConscript
43 lines (30 loc) · 1.17 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
40
41
42
43
"""Build security library"""
def scons():
"""Execute build"""
Import('env', 'prereqs', 'libdaos_tgts')
env.AppendUnique(LIBPATH=[Dir('.')])
denv = env.Clone()
denv.require('protobufc')
sec_obj = denv.SharedObject('cli_security.c')
auth_obj = denv.SharedObject('auth.pb-c.c')
acl_obj = denv.SharedObject('acl.c')
# dc_security: Security Client
dc_security_tgts = [sec_obj, auth_obj, acl_obj]
libdaos_tgts.extend(dc_security_tgts)
if not prereqs.server_requested():
return
senv = denv.Clone()
senv.require("argobots")
senv.AppendUnique(LIBS=['gurt'])
srv_acl_obj = senv.SharedObject('srv_acl.c')
ds_sec = senv.d_library('security', ['srv.c', srv_acl_obj, acl_obj], install_off="../..")
senv.Install('$PREFIX/lib64/daos_srv', ds_sec)
# pylint: disable-next=unused-variable
acl_tgts = [auth_obj, srv_acl_obj, acl_obj]
dc_sectest_tgts = [srv_acl_obj, acl_obj, sec_obj, auth_obj]
Export('dc_sectest_tgts')
if prereqs.test_requested():
denv = senv
SConscript('tests/SConscript', exports=['denv', 'dc_security_tgts', 'acl_tgts'])
if __name__ == "SCons.Script":
scons()