Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / resource-container / examples / DiscomfortIndexSensorBundle / src / inputSensors / THSensorApp1 / SConscript
1 ##
2 # linux sample sensor app  build script
3 ##
4
5 Import('env')
6
7 # Add third party libraries
8 lib_env = env.Clone()
9 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
10 linux_sample_env = lib_env.Clone()
11
12 ######################################################################
13 # Build flags
14 ######################################################################
15 linux_sample_env.AppendUnique(CPPPATH = ['include'])
16 linux_sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-pthread','-std=c++0x'])
17 linux_sample_env.AppendUnique(CPPDEFINES = ['LINUX'])
18 linux_sample_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
19 linux_sample_env.AppendUnique(LIBS = ['oc'])
20 linux_sample_env.AppendUnique(LIBS = ['octbstack'])
21 linux_sample_env.AppendUnique(LIBS = ['libconnectivity_abstraction'])
22 linux_sample_env.AppendUnique(LIBS = ['libcoap'])
23 linux_sample_env.AppendUnique(LIBS = ['liboc_logger'])
24 linux_sample_env.AppendUnique(LIBS = ['pthread'])
25
26 if env.get('SECURED') == '1':
27     linux_sample_env.AppendUnique(LIBS = ['tinydtls'])
28
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'])
33
34 ######################################################################
35 #build sampleapp
36 ######################################################################
37 thsensorapp1 = linux_sample_env.Program('THSensorApp1', 'src/ThingResourceServer1.cpp')
38 Alias("thsensorapp1_sample", thsensorapp1)
39 env.AppendTarget('thsensorapp1_sample')