######################################################################
# Common build options (release, target os, target arch)
######################################################################
+targets_disallow_multitransport = ['arduino']
+
help_vars = Variables()
help_vars.Add(BoolVariable('RELEASE', 'Build for release?', True)) # set to 'no', 'false' or 0 for debug
help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map[host]))
-help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'WIFI', 'BT', 'BLE', 'ETHERNET']))
+
+if target_os in targets_disallow_multitransport:
+ help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ETHERNET', ['WIFI', 'BT', 'BLE', 'ETHERNET']))
+else:
+ help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'ALL', ['ALL', 'WIFI', 'BT', 'BLE', 'ETHERNET']))
+
help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os]))
help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1')))
help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1')))
print "Given Transport is %s" % transport
print "Given OS is %s" % target_os
+targets_disallow_multitransport = ['arduino']
+
+if target_os in targets_disallow_multitransport:
+ if ('ALL' in transport) or (len(transport) != 1):
+ print "*** Error invalid option values: TARGET_TRANSPORT"
+ print "%s disallowed until testing can validate use of multiple transports on %s %d" % (transport, target_os, len(transport))
+ Exit(1)
+
if 'ALL' in transport:
if target_os == 'linux':
env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'ETHERNET_ADAPTER','NO_EDR_ADAPTER','NO_LE_ADAPTER'])