1 #******************************************************************
3 # Copyright 2014 Samsung Electronics All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # linux sample app build script
27 # Add third party libraries
29 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
30 linux_sample_env = lib_env.Clone()
32 ######################################################################
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'])
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'])
58 ######################################################################
60 ######################################################################
61 ssmtesterapp = linux_sample_env.Program('SSMTesterApp', 'src/SSMTestApp.cpp')
62 Alias("ssmtesterapp_sample", ssmtesterapp)
63 env.AppendTarget('SSMTesterApp')