772c7d8dbde59c6d8dcefe271e1a99b6df08b25f
[platform/upstream/iotivity.git] / service / notification-manager / SampleApp / linux / 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 ######################################################################
12 # Build flags
13 ######################################################################
14 notimgr_env.AppendUnique(CPPPATH = ['../../NotificationManager/include'])
15 notimgr_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson'])
16 notimgr_env.AppendUnique(CPPPATH = ['../../../../resource/csdk/connectivity/api'])
17 notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
18 notimgr_sample_env = notimgr_env.Clone()
19 notimgr_env.AppendUnique(LIBS = [
20     'NotificationManager',
21     'rcs_client',
22     'rcs_server',
23     'rcs_common',
24     'oc',
25     'octbstack',
26     'oc_logger',
27     'connectivity_abstraction',
28     'coap',
29     'pthread'
30     ])
31 notimgr_sample_env.AppendUnique(LIBS = [
32     'oc',
33     'octbstack',
34     'oc_logger',
35     'connectivity_abstraction',
36     'coap',
37     'pthread'
38     ])
39
40 if env.get('SECURED') == '1':
41     notimgr_env.AppendUnique(LIBS = ['tinydtls'])
42     notimgr_sample_env.AppendUnique(LIBS = ['tinydtls'])
43 if 'rt' in notimgr_env.get('LIBS'):
44     notimgr_env.Append(LIBS = ['rt'])
45 if 'rt' in notimgr_sample_env.get('LIBS'):
46     notimgr_sample_env.Append(LIBS = ['rt'])
47
48 ####################################################################
49 # Source files and Targets
50 ######################################################################
51 sampleprovider = notimgr_sample_env.Program('sampleprovider', 'sampleProvider/SampleProvider.cpp')
52 sampleconsumer = notimgr_sample_env.Program('sampleconsumer', 'sampleConsumer/SampleConsumer.cpp')
53
54 notificationmanager = notimgr_env.Program('notificationmanager', 'notificationManager/main.cpp')
55
56 notimgr_sample_env.InstallTarget(sampleprovider, 'sampleprovider')
57 notimgr_sample_env.InstallTarget(sampleconsumer, 'sampleconsumer')
58 notimgr_env.InstallTarget(notificationmanager, 'notificationmanager')