ca_transport = env.get('TARGET_TRANSPORT')
secured = env.get('SECURED')
with_ra = env.get ('WITH_RA')
+with_tcp = env.get('WITH_TCP')
root_dir = os.pardir
ca_path = os.curdir
# is interpreted by SCons as the top-level iotivity directory where
# the SConscruct file is found.
if env.get('SECURED') == '1':
- if ca_os == 'tizen':
- env.SConscript(os.path.join(root_dir, 'extlibs/tinydtls/SConscript'))
- else:
- env.SConscript('#extlibs/tinydtls/SConscript')
+ if ca_os == 'tizen' and os.path.exists(root_dir + '/extlibs/tinydtls'):
+ env.SConscript(os.path.join(root_dir, 'extlibs/tinydtls/SConscript'))
+ else:
+ env.SConscript('#extlibs/tinydtls/SConscript')
env.AppendUnique(CA_SRC = [os.path.join(ca_path,
'adapter_util/caadapterutils.c')])
env.AppendUnique(CA_SRC = [os.path.join(ca_path,
'adapter_util/cafragmentation.c')])
-if ca_os in ['android', 'tizen']:
- env.AppendUnique(CA_SRC=[os.path.join(ca_path, 'adapter_util/ifaddrs.c')])
if env.get('SECURED') == '1':
env.AppendUnique(CA_SRC = [os.path.join(ca_path,
'adapter_util/caadapternetdtls.c')])
env.AppendUnique(CPPPATH = [os.path.join(root_dir,
'external/inc')])
+if env.get('DTLS_WITH_X509') == '1':
+ src_dir = env.get('SRC_DIR')
+ env.AppendUnique(CPPPATH = [src_dir + '/resource/csdk/connectivity/inc/pkix'])
+ env.AppendUnique(CPPPATH = [src_dir + '/extlibs/tinydtls/ecc/'])
+ env.AppendUnique(CPPPATH = [src_dir + '/extlibs/tinydtls/sha2/'])
+ env.AppendUnique(CPPDEFINES = ['__WITH_X509__'])
+ if not env.get('RELEASE'):
+ env.AppendUnique(CPPDEFINES = ['X509_DEBUG'])
+ pkix_src = Glob('adapter_util/pkix/*.c');
+ env.AppendUnique(CA_SRC = pkix_src)
ca_common_src = None
+
+if env.get('ROUTING') == 'GW':
+ env.AppendUnique(CPPDEFINES = ['ROUTING_GATEWAY'])
+elif env.get('ROUTING') == 'EP':
+ env.AppendUnique(CPPDEFINES = ['ROUTING_EP'])
+
if ca_os == 'arduino':
env.AppendUnique(CPPDEFINES = ['SINGLE_THREAD'])
env.AppendUnique(CPPDEFINES = ['WITH_ARDUINO'])
'caqueueingthread.c',
'caretransmission.c',
]
- if not 'BLE' in ca_transport:
+ if (('BT' in ca_transport) or ('IP' in ca_transport) or ('ALL' in ca_transport)):
env.AppendUnique(CA_SRC = [os.path.join(ca_path, 'cablockwisetransfer.c') ])
env.AppendUnique(CPPDEFINES = ['WITH_BWT'])
if secured == '1':
env.AppendUnique(CPPDEFINES = ['__WITH_DTLS__'])
- if ca_os == 'tizen':
- env.AppendUnique(CPPPATH = [os.path.join(root_dir, 'extlibs/tinydtls')])
- else:
- env.AppendUnique(CPPPATH = ['#extlibs/tinydtls'])
+ if ca_os == 'tizen' and os.path.exists(root_dir + '/extlibs/tinydtls'):
+ env.AppendUnique(CPPPATH = [os.path.join(root_dir, 'extlibs/tinydtls')])
+ else:
+ env.AppendUnique(CPPPATH = ['#extlibs/tinydtls'])
ca_common_src = [
os.path.join(ca_path, d) for d in ca_common_src ]
env.AppendUnique(CA_SRC = ca_common_src)
if 'ALL' in ca_transport:
- transports = [ 'ip_adapter', 'bt_edr_adapter', 'bt_le_adapter' ]
+ transports = [ 'ip_adapter', 'bt_edr_adapter', 'bt_le_adapter']
if with_ra:
transports.append ('ra_adapter')
env.SConscript(dirs = [
if 'BLE' in ca_transport:
env.SConscript(os.path.join(ca_path, 'bt_le_adapter/SConscript'))
+if ca_os in ['linux', 'tizen', 'android']:
+ if with_tcp == True:
+ env.SConscript(os.path.join(ca_path, 'tcp_adapter/SConscript'))
+
print "Include path is %s" % env.get('CPPPATH')
print "Files path is %s" % env.get('CA_SRC')
if ca_os in ['android', 'tizen']:
+ env.AppendUnique(LIBS = ['coap'])
+ if env.get('SECURED') == '1':
+ env.AppendUnique(LIBS = ['tinydtls'])
+ if ca_os != 'android':
+ env.AppendUnique(LIBS = ['rt'])
calib = env.SharedLibrary('connectivity_abstraction', env.get('CA_SRC'))
else:
calib = env.StaticLibrary('connectivity_abstraction', env.get('CA_SRC'))
env.InstallTarget(calib, 'libconnectivity_abstraction')
-env.UserInstallTargetLib(calib, 'libconnectivity_abstraction')