replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / cpp-wrapper / examples / linux / SConscript
index 1470f3d..21d6d8e 100755 (executable)
@@ -43,12 +43,15 @@ notification_sample_env.AppendUnique(CPPPATH = ['../../../src/common'])
 notification_sample_env.PrependUnique(LIBS = [
        'liboctbstack',
        'oc_logger',
+       'oc',
        'connectivity_abstraction',
-       'libcoap'
+       'libcoap',
+        'resource_directory'
        ])
 
+notification_sample_env.AppendUnique(CXXFLAGS = ['-std=c++0x','-frtti'])
 if target_os not in ['windows', 'winrt']:
-       notification_sample_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
+       notification_sample_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0'])
 
 if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
        notification_sample_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
@@ -60,12 +63,31 @@ if target_os == 'android':
        notification_sample_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
        notification_sample_env.AppendUnique(LIBS = ['gnustl_shared','log'])
 
-       if not env.get('RELEASE'):
-               notification_sample_env.AppendUnique(LIBS = ['log'])
+if not env.get('RELEASE'):
+    notification_sample_env.PrependUnique(LIBS = ['gcov'])
+    notification_sample_env.AppendUnique(CCFLAGS = ['--coverage'])
 
-if env.get('WITH_CLOUD') == True:      
+if env.get('WITH_CLOUD') == True:
        notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
 
+with_mq = env.get('WITH_MQ')
+if 'SUB' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
+    print "MQ SUB support"
+
+if 'PUB' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
+    print "MQ PUB support"
+
+if 'BROKER' in with_mq:
+    notification_sample_env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
+    print "MQ Broker support"
+
+if env.get('WITH_TCP') == True:
+       notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
+if env.get('SECURED') == '1':
+       notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+
 ####################################################################
 # Source files and Targets
 ######################################################################