Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / soft-sensor-manager / SampleApp / linux / SSMTesterApp / 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 = ['../../../SDK/cpp/include'])
37 linux_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
38 linux_sample_env.AppendUnique(CPPDEFINES = ['LINUX'])
39 linux_sample_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
40 linux_sample_env.AppendUnique(LIBS = ['libSSMSDK'])
41 linux_sample_env.AppendUnique(LIBS = ['libSSMCore'])
42 linux_sample_env.AppendUnique(LIBS = ['pthread'])
43 linux_sample_env.AppendUnique(LIBS = ['oc'])
44 linux_sample_env.AppendUnique(LIBS = ['octbstack'])
45 linux_sample_env.AppendUnique(LIBS = ['connectivity_abstraction'])
46 linux_sample_env.AppendUnique(LIBS = ['coap'])
47 linux_sample_env.AppendUnique(LIBS = ['libcoap'])
48 linux_sample_env.AppendUnique(LIBS = ['liboc_logger'])
49 linux_sample_env.AppendUnique(LIBS = ['dl'])
50 if env.get('SECURED') == '1':
51     linux_sample_env.AppendUnique(LIBS = ['tinydtls'])
52
53 # On some platforms link order can miss functions so librt needs to be
54 # re-scanned at the end if present. gcc 4.6 is one with this issue.
55 if 'rt' in linux_sample_env.get('LIBS'):
56     linux_sample_env.Append(LIBS = ['rt'])
57
58 ######################################################################
59 #build sampleapp
60 ######################################################################
61 ssmtesterapp = linux_sample_env.Program('SSMTesterApp', 'src/SSMTestApp.cpp')
62 Alias("ssmtesterapp_sample", ssmtesterapp)
63 env.AppendTarget('SSMTesterApp')
64