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 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # NotificationManager build script
27 if env.get('RELEASE'):
28 env.AppendUnique(CCFLAGS = ['-Os'])
29 env.AppendUnique(CPPDEFINES = ['NDEBUG'])
31 env.AppendUnique(CCFLAGS = ['-g'])
33 if env.get('LOGGING'):
34 env.AppendUnique(CPPDEFINES = ['TB_LOG'])
37 SConscript('#service/third_party_libs.scons', 'lib_env')
38 scenemanager_env = lib_env.Clone()
40 target_os = env.get('TARGET_OS')
41 ######################################################################
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'])
52 scenemanager_env.PrependUnique(LIBS = [
54 'connectivity_abstraction',
63 if target_os not in ['windows']:
64 scenemanager_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
66 if target_os not in ['darwin', 'ios', 'windows']:
67 scenemanager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
69 if target_os in ['linux']:
70 scenemanager_env.AppendUnique(LIBS = ['pthread'])
72 if target_os == 'android':
73 scenemanager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
74 scenemanager_env.AppendUnique(LIBS = ['gnustl_shared','log'])
76 if not env.get('RELEASE') and target_os not in ['ios']:
77 scenemanager_env.PrependUnique(LIBS = ['gcov'])
78 scenemanager_env.AppendUnique(CXXFLAGS = ['--coverage'])
80 ######################################################################
81 # Source files and Targets
82 ######################################################################
83 SCENE_SRC_DIR = './src/'
84 scenemanager_src = Glob(SCENE_SRC_DIR + '*.cpp')
86 if target_os in ['tizen','android'] :
87 scenemanagersdk = scenemanager_env.SharedLibrary('scene_manager', scenemanager_src)
89 scenemanagersdk = scenemanager_env.StaticLibrary('scene_manager', scenemanager_src)
91 scenemanager_env.InstallTarget(scenemanagersdk, 'libscene_manager')
92 scenemanager_env.UserInstallTargetLib(scenemanagersdk, 'libscene_manager')
93 scenemanager_env.UserInstallTargetHeader('include/SceneList.h', 'service/scene-manager', 'SceneList.h')
94 scenemanager_env.UserInstallTargetHeader('include/SceneCollection.h', 'service/scene-manager', 'SceneCollection.h')
95 scenemanager_env.UserInstallTargetHeader('include/Scene.h', 'service/scene-manager', 'Scene.h')
96 scenemanager_env.UserInstallTargetHeader('include/SceneAction.h', 'service/scene-manager', 'SceneAction.h')
97 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneList.h', 'service/scene-manager', 'RemoteSceneList.h')
98 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneCollection.h', 'service/scene-manager', 'RemoteSceneCollection.h')
99 scenemanager_env.UserInstallTargetHeader('include/RemoteScene.h', 'service/scene-manager', 'RemoteScene.h')
100 scenemanager_env.UserInstallTargetHeader('include/RemoteSceneAction.h', 'service/scene-manager', 'RemoteSceneAction.h')
102 # Go to build Unit test
103 if target_os in ['linux']:
104 SConscript('unittests/SConscript')
106 # Go to build sample apps
107 SConscript('sampleapp/SConscript')