Add: PUT/DELETE method for Resource Hosting.
[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.AppendUnique(CPPPATH = ['../../extlibs/cjson'])
17 notimgr_env.AppendUnique(CPPPATH = ['../../resource/csdk/logger/include'])
18 notimgr_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'coap'])
19
20 if target_os not in ['windows', 'winrt']:
21         notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0'])
22
23 if target_os == 'linux':
24         notimgr_env.AppendUnique(LIBS = ['pthread'])
25
26 if target_os == 'android':
27         notimgr_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
28         notimgr_env.AppendUnique(LIBS = ['gnustl_static'])
29
30         if not env.get('RELEASE'):
31                 notimgr_env.AppendUnique(LIBS = ['log'])
32
33 ######################################################################
34 # Source files and Targets
35 ######################################################################
36 NOTI_SRC_DIR = 'NotificationManager/src/'
37 notimgr_src = [
38         NOTI_SRC_DIR + 'hosting.c',
39         NOTI_SRC_DIR + 'requestHandler.c',
40         NOTI_SRC_DIR + 'virtualResource.c']
41
42 notificationsdk = notimgr_env.StaticLibrary('NOTISDKLibrary', notimgr_src)
43
44 notimgr_env.InstallTarget(notificationsdk, 'libNMSDK')
45
46 # Go to build sample apps
47 SConscript('SampleApp/SConscript')