add scene manager remote interface class implementation
[platform/upstream/iotivity.git] / service / scene-manager / SConscript
1 #******************************************************************
2 #
3 # Copyright 2015 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 # NotificationManager build script
23 ##
24
25 Import('env')
26
27 if env.get('RELEASE'):
28     env.AppendUnique(CCFLAGS = ['-Os'])
29     env.AppendUnique(CPPDEFINES = ['NDEBUG'])
30 else:
31     env.AppendUnique(CCFLAGS = ['-g'])
32
33 if env.get('LOGGING'):
34     env.AppendUnique(CPPDEFINES = ['TB_LOG'])
35
36 lib_env = env.Clone()
37 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
38 scenemanager_env = lib_env.Clone()
39
40 target_os = env.get('TARGET_OS')
41 ######################################################################
42 # Build flags
43 ######################################################################
44 scenemanager_env.AppendUnique(CPPPATH = ['./include'])
45 scenemanager_env.AppendUnique(CPPPATH = ['./src'])
46 scenemanager_env.AppendUnique(CPPPATH = ['../../resource/csdk/connectivity/api'])
47 scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/include'])
48 scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/primitiveResource/include'])
49 scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/expiryTimer/include'])
50
51 scenemanager_env.PrependUnique(LIBS = [
52     'rcs_client',
53     'rcs_server',
54     'rcs_common',
55     'oc',
56     'octbstack',
57     'oc_logger',
58     'connectivity_abstraction',
59     'libcoap'
60     ])
61
62 if target_os not in ['windows', 'winrt']:
63     scenemanager_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
64
65 if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
66     scenemanager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
67
68 if target_os == 'linux':
69     scenemanager_env.AppendUnique(LIBS = ['pthread'])
70
71 if target_os == 'android':
72     scenemanager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
73     scenemanager_env.AppendUnique(LIBS = ['gnustl_shared','log'])
74
75     if not env.get('RELEASE'):
76         scenemanager_env.AppendUnique(LIBS = ['log'])
77
78 ######################################################################
79 # Source files and Targets
80 ######################################################################
81 SCENE_SRC_DIR = './src/' 
82 scenemanager_src = Glob(SCENE_SRC_DIR + '*.cpp')
83
84 if target_os in ['tizen','android'] :
85     scenemanagersdk = scenemanager_env.SharedLibrary('scene_manager', scenemanager_src)
86 else :
87     scenemanagersdk = scenemanager_env.StaticLibrary('scene_manager', scenemanager_src)
88
89 scenemanager_env.InstallTarget(scenemanagersdk, 'libscene_manager')
90 scenemanager_env.UserInstallTargetLib(scenemanagersdk, 'libscene_manager')
91 scenemanager_env.UserInstallTargetHeader('include/SceneList.h', 'service/scene-manager', 'SceneList.h')
92 scenemanager_env.UserInstallTargetHeader('include/SceneCollection.h', 'service/scene-manager', 'SceneCollection.h')
93 scenemanager_env.UserInstallTargetHeader('include/Scene.h', 'service/scene-manager', 'Scene.h')
94 scenemanager_env.UserInstallTargetHeader('include/SceneAction.h', 'service/scene-manager', 'SceneAction.h')
95 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneList.h', 'service/scene-manager', 'RemoteSceneList.h')
96 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneCollection.h', 'service/scene-manager', 'RemoteSceneCollection.h')
97 scenemanager_env.UserInstallTargetHeader('include/RemoteScene.h', 'service/scene-manager', 'RemoteScene.h')
98 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h')
99
100 # Go to build Unit test
101 #if target_os == 'linux':
102 #    SConscript('src/unittest/SConscript')
103
104 # Go to build sample apps
105 SConscript('sampleapp/SConscript')