replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / SConscript
index f7f8edf..ab2dcf9 100755 (executable)
@@ -66,6 +66,9 @@ if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
 
 if target_os == 'linux':
        notification_env.AppendUnique(LIBS = ['pthread'])
+       if not env.get('RELEASE'):
+               notification_env.PrependUnique(LIBS = ['gcov'])
+               notification_env.AppendUnique(CCFLAGS = ['--coverage'])
 
 if target_os == 'android':
        notification_env.AppendUnique(CCFLAGS = ['-frtti', '-fexceptions'])
@@ -74,12 +77,13 @@ if target_os == 'android':
        if not env.get('RELEASE'):
                notification_env.AppendUnique(LIBS = ['log'])
 
-if not env.get('RELEASE'):
-       notification_env.PrependUnique(LIBS = ['gcov'])
-       notification_env.AppendUnique(CCFLAGS = ['--coverage'])
+if target_os == 'tizen':
+       notification_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
+       # notification_env.ParseConfig('pkg-config --cflags --libs sqlite3')
 
-if 'CLIENT' in notification_env.get('RD_MODE'):
-       notification_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
+if target_os == 'ios':
+       if 'CLIENT' in notification_env.get('RD_MODE'):
+               notification_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
 
 if env.get('WITH_CLOUD') == True:
        notification_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
@@ -87,6 +91,20 @@ if env.get('WITH_CLOUD') == True:
 if env.get('SECURED') == '1':
        notification_env.AppendUnique(CPPDEFINES = ['SECURED'])
 
+with_mq = env.get('WITH_MQ')
+if 'SUB' in with_mq:
+    notification_env.AppendUnique(CPPDEFINES = ['MQ_SUBSCRIBER', 'WITH_MQ'])
+    print "MQ SUB support"
+
+if 'PUB' in with_mq:
+    notification_env.AppendUnique(CPPDEFINES = ['MQ_PUBLISHER', 'WITH_MQ'])
+    print "MQ PUB support"
+
+if 'BROKER' in with_mq:
+    notification_env.AppendUnique(CPPDEFINES = ['MQ_BROKER', 'WITH_MQ'])
+    print "MQ Broker support"
+
+
 ######################################################################
 # Source files and Targets
 ######################################################################
@@ -98,19 +116,20 @@ if target_os == 'android':
 if target_os == 'android':
        notification_consumer_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libnotification_consumer.so'])
 
+notification_common_obj = notification_provider_env.SharedObject(env.Glob('src/common/*.c'))
+
 notification_provider_src = [
-       env.Glob('src/provider/*.c'), env.Glob('src/common/*.c')]
+       env.Glob('src/provider/*.c'), notification_common_obj]
 notification_consumer_src = [
-       env.Glob('src/consumer/*.c'), env.Glob('src/common/*.c')]
+       env.Glob('src/consumer/*.c'), notification_common_obj]
 
-
-providersdk = notification_provider_env.SharedLibrary('notification_provider', notification_provider_src)
-notification_provider_env.InstallTarget(providersdk, 'libnotification_provider')
-notification_provider_env.UserInstallTargetLib(providersdk, 'libnotification_provider')
-
-consumersdk = notification_consumer_env.SharedLibrary('notification_consumer', notification_consumer_src)
-notification_consumer_env.InstallTarget(consumersdk, 'libnotification_consumer')
-notification_consumer_env.UserInstallTargetLib(consumersdk, 'libnotification_consumer')
+if target_os not in ['ios']:
+    providersdk = notification_provider_env.SharedLibrary('notification_provider', notification_provider_src)
+    notification_provider_env.InstallTarget(providersdk, 'libnotification_provider')
+    notification_provider_env.UserInstallTargetLib(providersdk, 'libnotification_provider')
+    consumersdk = notification_consumer_env.SharedLibrary('notification_consumer', notification_consumer_src)
+    notification_consumer_env.InstallTarget(consumersdk, 'libnotification_consumer')
+    notification_consumer_env.UserInstallTargetLib(consumersdk, 'libnotification_consumer')
 
 providersdk = notification_provider_env.StaticLibrary('notification_provider', notification_provider_src)
 notification_provider_env.InstallTarget(providersdk, 'libnotification_provider')
@@ -124,6 +143,9 @@ notification_provider_env.UserInstallTargetHeader('include/NSProviderInterface.h
        'service/notification', 'NSProviderInterface.h')
 notification_consumer_env.UserInstallTargetHeader('include/NSConsumerInterface.h',\
        'service/notification', 'NSConsumerInterface.h')
+notification_consumer_env.UserInstallTargetHeader('include/NSCommon.h',\
+       'service/notification', 'NSCommon.h')
+
 
 # Go to build Unit test
 if target_os == 'linux':
@@ -136,4 +158,4 @@ if target_os == 'android':
     SConscript('android/SConscript')
 
 # Go to build sample apps
-SConscript('examples/SConscript')
+#SConscript('examples/SConscript')