examples: Removing redundant configuration 77/21477/7
authorPawel Winogrodzki <pawelwi@microsoft.com>
Thu, 6 Jul 2017 23:49:49 +0000 (16:49 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Fri, 11 Aug 2017 22:02:21 +0000 (22:02 +0000)
Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/examples/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Icc1661f2e54c27efbaa9787d082a0e2e121e0e20
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21477
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
examples/OICMiddle/SConscript

index 5a3ea8f..a2b8ce7 100644 (file)
@@ -32,12 +32,15 @@ examples_env = lib_env.Clone()
 # Build flags
 ######################################################################
 examples_env.AppendUnique(CPPPATH=[
-    '../../resource/include/',
-    '../../resource/csdk/include',
-    '../../resource/csdk/stack/include',
-    '../../resource/c_common/ocrandom/include',
-    '../../resource/csdk/logger/include',
-    '../../resource/oc_logger/include'
+    '#/resource/include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/c_common/ocrandom/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/oc_logger/include',
 ])
 
 target_os = env.get('TARGET_OS')
@@ -52,14 +55,12 @@ if target_os not in ['windows']:
     if target_os != 'android':
         examples_env.AppendUnique(LIBS=['pthread'])
 
-examples_env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
 examples_env.PrependUnique(LIBS=['coap'])
 examples_env.AppendUnique(LIBS=[
     'connectivity_abstraction',
     'oc_logger',
     'octbstack',
     'oc',
-    'rt'
 ])
 
 if env.get('SECURED') == '1':
@@ -75,9 +76,6 @@ if target_os == 'android':
 if target_os in ['darwin', 'ios']:
     examples_env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
 
-if env.get('WITH_CLOUD'):
-    examples_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
-
 ######################################################################
 # Source files and Targets
 ######################################################################
@@ -87,7 +85,7 @@ OICMiddle = examples_env.Program('OICMiddle', [
     'LineInput.cpp',
     'RestInput.cpp',
     'Server.cpp',
-    'WrapResource.cpp'
+    'WrapResource.cpp',
 ])
 
 Alias("examples", [OICMiddle])