1 #******************************************************************
3 # Copyright 2015 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 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
23 ocprovision_env = env.Clone()
25 ######################################################################
27 ######################################################################
28 ocprovision_env.AppendUnique(CPPPATH = [
30 '../csdk/stack/include',
31 '../csdk/logger/include',
32 '../oc_logger/include',
33 '../csdk/connectivity/api',
34 '../csdk/security/include',
35 '../csdk/security/provisioning/include',
36 '../csdk/security/provisioning/include/oxm',
37 '../csdk/security/provisioning/include/internal',
38 '../csdk/connectivity/lib/libcoap-4.1.1/',
39 '../../extlibs/cjson/'
42 target_os = env.get('TARGET_OS')
43 if target_os not in ['windows']:
44 ocprovision_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
46 if target_os == 'android':
47 ocprovision_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
48 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
49 ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
51 if target_os in ['linux', 'tizen']:
52 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
53 ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread'])
55 if target_os in ['darwin', 'ios']:
56 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
57 ocprovision_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
59 ######################################################################
60 # Source files and Targets
61 ######################################################################
63 'src/OCProvisioningManager.cpp'
66 ocprovision = ocprovision_env.SharedLibrary('ocprovision', ocprovision_src)
67 ocprovision_env.InstallTarget(ocprovision, 'libocprovision')
68 ocprovision_env.UserInstallTargetLib(ocprovision, 'libocprovision')
70 if target_os in ['linux']:
71 SConscript('examples/SConscript')