replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / cpp-wrapper / examples / linux / SConscript
index 96d8f35..21d6d8e 100755 (executable)
@@ -1,3 +1,23 @@
+#******************************************************************
+#
+# Copyright 2016 Samsung Electronics All Rights Reserved.
+#
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
 ##
 # Notification build script
 ##
@@ -23,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'])
@@ -40,8 +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:
+       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
 ######################################################################