SConscript('#resource/third_party_libs.scons', 'lib_env')
examples_env = lib_env.Clone()
target_os = examples_env.get('TARGET_OS')
+rd_mode = examples_env.get('RD_MODE')
+ble_custom_adv = examples_env.get('BLE_CUSTOM_ADV')
+
######################################################################
# Build flags
######################################################################
examples_env.PrependUnique(LIBS = ['mswsock', 'ws2_32', 'iphlpapi', 'ole32'])
if examples_env.get('SECURED') == '1':
- examples_env.AppendUnique(LIBS = ['tinydtls'])
+ examples_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
examples_env.AppendUnique(CPPDEFINES = ['_WITH_DTLS_'])
if target_os in ['msys_nt', 'windows']:
examples_env.AppendUnique(LIBS = ['advapi32'])
if target_os in ['darwin', 'ios']:
examples_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
-if examples_env.get('LOGGING'):
- examples_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-
if examples_env.get('WITH_CLOUD'):
examples_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
+if ble_custom_adv == True:
+ env.AppendUnique(CPPDEFINES = ['BLE_CUSTOM_ADVERTISE'])
+
if target_os in ['msys_nt', 'windows']:
examples_env.AppendUnique(LIBS = ['Comctl32', 'Gdi32', 'User32'])
if examples_env.get('LOGGING'):
examples_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-if 'CLIENT' in examples_env.get('RD_MODE'):
- examples_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
-
def make_single_file_cpp_program(program_name):
return examples_env.Program(program_name, program_name + ".cpp")
'groupserver',
'groupclient',
'lightserver',
- 'threadingsample'
- ]
-
-if 'CLIENT' in examples_env.get('RD_MODE'):
- example_names += [
- 'rdclient'
+ 'threadingsample',
]
+ if 'CLIENT' in examples_env.get('RD_MODE'):
+ examples_env.AppendUnique(CPPPATH = ['../csdk/resource-directory/include'])
+ example_names += ['rdclient']
+ examples_env.AppendUnique(LIBS = ['resource_directory'])
examples = map(make_single_file_cpp_program, example_names)