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 # 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(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
38 notimgr_env = lib_env.Clone()
40 target_os = env.get('TARGET_OS')
41 ######################################################################
43 ######################################################################
44 notimgr_env.AppendUnique(CPPPATH = ['NotificationManager/include'])
45 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/include'])
46 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/primitiveResource/include'])
47 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/serverBuilder/include'])
48 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/resourceBroker/include'])
49 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/resourceCache/include'])
50 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/expiryTimer/include'])
51 notimgr_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/expiryTimer/src'])
52 #notimgr_env.AppendUnique(CPPPATH = ['../../extlibs/cjson'])
53 #notimgr_env.AppendUnique(CPPPATH = ['../../resource/csdk/logger/include'])
54 notimgr_env.PrependUnique(LIBS = [
61 'connectivity_abstraction',
65 if target_os not in ['windows', 'winrt']:
66 notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
68 if target_os == 'linux':
69 notimgr_env.AppendUnique(LIBS = ['pthread'])
71 if target_os == 'android':
72 notimgr_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
73 notimgr_env.AppendUnique(LIBS = ['gnustl_shared','log'])
75 if not env.get('RELEASE'):
76 notimgr_env.AppendUnique(LIBS = ['log'])
78 ######################################################################
79 # Source files and Targets
80 ######################################################################
81 NOTI_SRC_DIR = 'NotificationManager/src/'
83 NOTI_SRC_DIR + 'hosting.cpp',
84 NOTI_SRC_DIR + 'ResourceHosting.cpp',
85 NOTI_SRC_DIR + 'HostingObject.cpp',
86 NOTI_SRC_DIR + 'RequestObject.cpp'
89 if target_os in ['tizen','android'] :
90 notificationsdk = notimgr_env.SharedLibrary('NotificationManager', notimgr_src)
92 notificationsdk = notimgr_env.StaticLibrary('NotificationManager', notimgr_src)
94 notimgr_env.InstallTarget(notificationsdk, 'libResouceHosting')
96 # Go to build sample apps
97 SConscript('SampleApp/SConscript')