Replace glib threadpool usage with a 'dumb' thread implementation.
[platform/upstream/iotivity.git] / service / things-manager / sampleapp / linux / groupaction / SConscript
1 #******************************************************************
2 #
3 # Copyright 2014 Samsung Electronics All Rights Reserved.
4 #
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 ##
22 # linux sample app  build script
23 ##
24
25 Import('env')
26
27 # Add third party libraries
28 lib_env = env.Clone()
29 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
30 linux_sample_env = lib_env.Clone()
31
32 ######################################################################
33 # Build flags
34 ######################################################################
35 linux_sample_env.AppendUnique(CPPPATH = ['include'])
36 linux_sample_env.AppendUnique(CPPPATH = ['../../../../../extlibs/timer'])
37 linux_sample_env.AppendUnique(CPPPATH = ['../../../sdk/inc'])
38 linux_sample_env.AppendUnique(CPPPATH = ['../../../sdk/src'])
39 linux_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-DLINUX', '-pthread'])
40 linux_sample_env.AppendUnique(CPPDEFINES = ['LINUX'])
41 linux_sample_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
42 linux_sample_env.AppendUnique(LIBS = ['libTGMSDKLibrary', 'oc', 'octbstack',
43                                       'connectivity_abstraction',
44                                       'libcoap', 'liboc_logger', 'dl', 'pthread'])
45 if env.get('SECURED') == '1':
46     linux_sample_env.AppendUnique(LIBS = ['tinydtls'])
47
48 # On some platforms link order can miss functions so librt needs to be
49 # re-scanned at the end if present. gcc 4.6 is one with this issue.
50 if 'rt' in linux_sample_env.get('LIBS'):
51     linux_sample_env.Append(LIBS = ['rt'])
52
53 ######################################################################
54 #build sampleapp
55 ######################################################################
56 groupserver = linux_sample_env.Program('groupserver', 'groupserver.cpp')
57 lightserver = linux_sample_env.Program('lightserver', 'lightserver.cpp')
58 bookmark = linux_sample_env.Program('bookmark', 'bookmark.cpp')
59 Alias("GroupServerApp", groupserver)
60 Alias("LightServerApp", lightserver)
61 Alias("BookmarkApp", bookmark)
62 env.AppendTarget('GroupServerApp')
63 env.AppendTarget('LightServerApp')
64 env.AppendTarget('BookmarkApp')