Modifying version number for building on tizen 3.0
[platform/upstream/iotivity.git] / service / notification-manager / SConscript
1 ##
2 # NotificationManager build script
3 ##
4
5 Import('env')
6
7 lib_env = env.Clone()
8 SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
9 notimgr_env = lib_env.Clone()
10
11 target_os = env.get('TARGET_OS')
12 ######################################################################
13 # Build flags
14 ######################################################################
15 notimgr_env.AppendUnique(CPPPATH = ['NotificationManager/include'])
16 notimgr_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'coap'])
17
18 if target_os not in ['windows', 'winrt']:
19         notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
20
21 if target_os == 'linux':
22         notimgr_env.AppendUnique(LIBS = ['pthread'])
23
24 if target_os == 'android':
25         notimgr_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
26         notimgr_env.AppendUnique(LIBS = ['gnustl_static'])
27
28         if not env.get('RELEASE'):
29                 notimgr_env.AppendUnique(LIBS = ['log'])
30
31 ######################################################################
32 # Source files and Targets
33 ######################################################################
34 NOTI_SRC_DIR = 'NotificationManager/src/'
35 notimgr_src = [
36                 NOTI_SRC_DIR + 'LinuxMain.cpp',
37                 NOTI_SRC_DIR + 'NotificationManager.cpp',
38                 NOTI_SRC_DIR + 'RegistrationManager.cpp',
39                 NOTI_SRC_DIR + 'ResourceManager.cpp',
40                 NOTI_SRC_DIR + 'VirtualRepresentation.cpp']
41
42 notificationmanager = notimgr_env.Program('noti_manager', notimgr_src)
43
44 notimgr_env.InstallTarget(notificationmanager, 'notificationmanager')
45
46 # Go to build sample apps
47 SConscript('SampleApp/SConscript')