2 # linux sample app build script
7 # Add third party libraries
9 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
10 linux_sample_env = lib_env.Clone()
12 ######################################################################
14 ######################################################################
15 linux_sample_env.AppendUnique(CPPPATH = ['include'])
16 linux_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
17 linux_sample_env.AppendUnique(CPPDEFINES = ['LINUX'])
18 linux_sample_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
19 linux_sample_env.AppendUnique(LIBS = ['coap'])
20 linux_sample_env.AppendUnique(LIBS = ['connectivity_abstraction'])
21 linux_sample_env.AppendUnique(LIBS = ['oc_logger'])
22 linux_sample_env.AppendUnique(LIBS = ['octbstack'])
23 linux_sample_env.AppendUnique(LIBS = ['oc'])
24 linux_sample_env.AppendUnique(LIBS = ['pthread'])
26 if env.get('SECURED') == '1':
27 linux_sample_env.AppendUnique(LIBS = ['tinydtls'])
29 # On some platforms link order can miss functions so librt needs to be
30 # re-scanned at the end if present. gcc 4.6 is one with this issue.
31 if 'rt' in linux_sample_env.get('LIBS'):
32 linux_sample_env.Append(LIBS = ['rt'])
34 ######################################################################
36 ######################################################################
37 heightsensorapp = linux_sample_env.Program('HeightSensorApp', 'src/HeightSensorApp.cpp')
38 Alias("heightsensorapp_sample", heightsensorapp)
39 env.AppendTarget('heightsensorapp')