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(CPPPATH = ['../../../sdk/inc'])
17 linux_sample_env.AppendUnique(CPPPATH = ['../../../sdk/src'])
18 linux_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
19 linux_sample_env.AppendUnique(CPPDEFINES = ['LINUX'])
20 linux_sample_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
21 linux_sample_env.AppendUnique(LIBS = ['libTGMSDKLibrary', 'oc', 'octbstack',
22 'connectivity_abstraction',
23 'libcoap', 'liboc_logger', 'dl', 'pthread'])
25 if env.get('SECURED') == '1':
26 linux_sample_env.AppendUnique(LIBS = ['tinydtls'])
28 linux_sample_env.ParseConfig('pkg-config --libs glib-2.0')
30 ######################################################################
32 ######################################################################
33 groupserver = linux_sample_env.Program('groupserver', 'groupserver.cpp')
34 lightserver = linux_sample_env.Program('lightserver', 'lightserver.cpp')
35 bookmark = linux_sample_env.Program('bookmark', 'bookmark.cpp')
36 Alias("GroupServerApp", groupserver)
37 Alias("LightServerApp", lightserver)
38 Alias("BookmarkApp", bookmark)
39 env.AppendTarget('GroupServerApp')
40 env.AppendTarget('LightServerApp')
41 env.AppendTarget('BookmarkApp')