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'
40 target_os = env.get('TARGET_OS')
41 if target_os not in ['windows', 'winrt']:
42 ocprovision_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
44 if target_os == 'android':
45 ocprovision_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
46 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
47 ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
49 if target_os == 'linux':
50 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
51 ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread'])
53 if target_os in ['darwin', 'ios']:
54 ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
55 ocprovision_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
57 ######################################################################
58 # Source files and Targets
59 ######################################################################
61 'src/OCProvisioningManager.cpp'
64 ocprovision = ocprovision_env.SharedLibrary('ocprovision', ocprovision_src)
65 ocprovision_env.InstallTarget(ocprovision, 'libocprovision')
67 if target_os in ['linux']:
68 SConscript('examples/SConscript')