/
SConscript
53 lines (44 loc) · 1.41 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
44
45
46
47
48
49
50
51
52
53
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
# -*- mode: python; -*-
import sys
Import('BuildEnv')
env = BuildEnv.Clone()
env.CppDisableExceptions()
env.Append(CPPPATH = [env['TOP']])
SandeshGenFiles = env.SandeshGenCpp('io.sandesh')
SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)
except_env = BuildEnv.Clone()
except_env.Append(CPPPATH = env['TOP_INCLUDE'] + '/thrift')
except_env.Append(CPPPATH = [env['TOP']])
EventManagerSrc = except_env.Object('event_manager.cc')
SslServerSrc = except_env.Object('ssl_server.cc')
usock_env = BuildEnv.Clone()
usock_env.CppEnableExceptions()
usock_env.Append(CPPPATH = env['TOP'])
usock_server = usock_env.Object('usock_server.cc')
IoSrc = [
'io_utils.cc',
'ssl_session.cc',
'tcp_message_write.cc',
'tcp_server.cc',
'tcp_session.cc',
'udp_server.cc',
'process_signal.cc',
]
if sys.platform != 'win32':
IoSrc.append(usock_server)
# IO
contrail_common_io_doc_files = []
io_doc_target = BuildEnv['TOP'] + '/io/'
contrail_common_io_doc_files += BuildEnv.SandeshGenDoc('#src/contrail-common/io/io.sandesh', io_doc_target)
env['IO_DOC_FILES'] = contrail_common_io_doc_files
Export('contrail_common_io_doc_files')
libio = env.Library('io',
SandeshGenSrcs +
EventManagerSrc +
SslServerSrc +
IoSrc)
env.Install(env['TOP_LIB'], libio)
env.SConscript('test/SConscript', exports='BuildEnv', duplicate = 0)