7 target_os = env.get('TARGET_OS')
8 transport = env.get('TARGET_TRANSPORT')
9 build_sample = env.get('BUILD_SAMPLE')
11 print "Given Transport is %s" % transport
12 print "Given OS is %s" % target_os
13 print "BUILD_SAMPLE is %s" % build_sample
15 targets_disallow_multitransport = ['arduino']
17 if target_os in targets_disallow_multitransport:
18 if ('ALL' in transport) or (len(transport) != 1):
19 print "*** Error invalid option values: TARGET_TRANSPORT"
20 print "%s disallowed until testing can validate use of multiple transports on %s %d" % (transport, target_os, len(transport))
23 if 'ALL' in transport:
24 if target_os == 'linux':
25 env.AppendUnique(CPPDEFINES = ['IP_ADAPTER','NO_EDR_ADAPTER','NO_LE_ADAPTER'])
26 elif target_os == 'tizen':
27 env.AppendUnique(CPPDEFINES = ['IP_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
28 elif target_os in['darwin','ios']:
29 env.AppendUnique(CPPDEFINES = ['IP_ADAPTER','NO_EDR_ADAPTER','NO_LE_ADAPTER'])
31 env.AppendUnique(CPPDEFINES = ['IP_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
32 print "CA Transport is ALL"
35 if target_os == 'linux':
36 print "CA Transport BT is not supported in Linux"
39 env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER'])
40 print "CA Transport is BT"
42 env.AppendUnique(CPPDEFINES = ['NO_EDR_ADAPTER'])
44 if 'BLE' in transport:
45 if target_os == 'linux':
46 print "CA Transport BLE is not supported in Linux"
49 env.AppendUnique(CPPDEFINES = ['LE_ADAPTER'])
50 print "CA Transport is BLE"
52 env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
55 env.AppendUnique(CPPDEFINES = ['IP_ADAPTER'])
56 print "CA Transport is IP"
58 env.AppendUnique(CPPDEFINES = ['NO_IP_ADAPTER'])
60 env.SConscript('./src/SConscript')
62 #if build_sample == 'ON':
63 # if target_os in ['linux', 'arduino', 'android']:
64 # env.SConscript('./samples/' + target_os + '/SConscript')