Reformat the resource/csdk SConscripts to be more Pythonic 1/4
authorMats Wichmann <mats@linux.com>
Sat, 3 Jun 2017 18:54:54 +0000 (12:54 -0600)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Wed, 14 Jun 2017 23:46:29 +0000 (23:46 +0000)
This is now part 1 of 4, containing the sconscripts not
in connectivity, stack or security (see other three parts for those)

There are not intended to be any functional changes.

In a couple of places, for general consistency, changed
  SConscript('#foo') to SConscript('#/foo') - these are equivalent
"help vars" assignments formatted so messages can be improved later
  without changing formatting
all EnumVariable usage now calls out allowed_values= to be more clear

The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
namespace unqualified unless it is really needed

The test harness is now consistently imported as:
  from tools.scons.RunTest import run_test
rather than import * - should normally avoid importing whole
namespace unqualified unless it is really needed

Change-Id: I3f818ef972a9c84f9d0aec27348ec6da07f49e02
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20817
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
resource/csdk/connectivity/build/tizen/scons/SConscript
resource/csdk/logger/SConscript
resource/csdk/resource-directory/SConscript
resource/csdk/resource-directory/samples/SConscript
resource/csdk/resource-directory/unittests/SConscript
resource/csdk/routing/SConscript

index 49c3b61..f5ca539 100755 (executable)
@@ -13,44 +13,52 @@ with_tcp = env.get('WITH_TCP')
 print "Given Transport is %s" % transport
 
 if env.get('RELEASE'):
-       env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
+    env.AppendUnique(CFLAGS=[
+        '-std=c99', '-fPIC', '-D__TIZEN__', '-DWITH_POSIX', '-Wall',
+        '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'
+    ])
 else:
-       env.AppendUnique(CFLAGS = ['-std=c99', '-fPIC', '-D__TIZEN__','-DWITH_POSIX', '-Wall', '-DSLP_SDK_LOG', '-g','-D_GNU_SOURCE','-DTIZEN_DEBUG_ENABLE'])
+    env.AppendUnique(CFLAGS=[
+        '-std=c99', '-fPIC', '-D__TIZEN__', '-DWITH_POSIX', '-Wall',
+        '-DSLP_SDK_LOG', '-g', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'
+    ])
 
 if env.get('LOGGING'):
-    env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+    env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
-env.ParseConfig("pkg-config --cflags --libs capi-network-connection dlog glib-2.0")
+env.ParseConfig(
+    "pkg-config --cflags --libs capi-network-connection dlog glib-2.0")
 if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
-       env.ParseConfig("pkg-config --cflags --libs ttrace")
+    env.ParseConfig("pkg-config --cflags --libs ttrace")
 if 'ALL' in transport:
-               env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
-               print "CA Transport is ALL"
+    env.AppendUnique(CPPDEFINES=[
+        'WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER', 'EDR_ADAPTER', 'LE_ADAPTER'
+    ])
+    print "CA Transport is ALL"
 else:
-       if 'BT' in transport:
-               env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER'])
-               print "CA Transport is BT"
-       else:
-               env.AppendUnique(CPPDEFINES = ['NO_EDR_ADAPTER'])
-
-       if 'BLE' in transport:
-               env.AppendUnique(CPPDEFINES = ['LE_ADAPTER'])
-               print "CA Transport is BLE"
-       else:
-               env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
-
-       if 'WIFI' in transport:
-               env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER'])
-               print "CA Transport is WIFI"
-       else:
-               env.AppendUnique(CPPDEFINES = ['NO_WIFI_ADAPTER'])
-
-       if with_tcp == True:
-               env.AppendUnique(CPPDEFINES = ['TCP_ADAPTER'])
-               print "CA Transport is TCP"
-       else:
-               env.AppendUnique(CPPDEFINES = ['NO_TCP_ADAPTER'])
+    if 'BT' in transport:
+        env.AppendUnique(CPPDEFINES=['EDR_ADAPTER'])
+        print "CA Transport is BT"
+    else:
+        env.AppendUnique(CPPDEFINES=['NO_EDR_ADAPTER'])
 
+    if 'BLE' in transport:
+        env.AppendUnique(CPPDEFINES=['LE_ADAPTER'])
+        print "CA Transport is BLE"
+    else:
+        env.AppendUnique(CPPDEFINES=['NO_LE_ADAPTER'])
+
+    if 'WIFI' in transport:
+        env.AppendUnique(CPPDEFINES=['WIFI_ADAPTER'])
+        print "CA Transport is WIFI"
+    else:
+        env.AppendUnique(CPPDEFINES=['NO_WIFI_ADAPTER'])
+
+    if with_tcp == True:
+        env.AppendUnique(CPPDEFINES=['TCP_ADAPTER'])
+        print "CA Transport is TCP"
+    else:
+        env.AppendUnique(CPPDEFINES=['NO_TCP_ADAPTER'])
 
 env.SConscript(['../con/lib/libcoap-4.1.1/SConscript'])
 env.SConscript(['../con/SConscript'])
index e149d01..03b7b06 100644 (file)
@@ -4,18 +4,23 @@ log_level = env.get('LOG_LEVEL')
 
 build_dir = env.get('BUILD_DIR')
 
-env.AppendUnique(CPPPATH = [os.path.join(Dir('.').abspath, 'include'),
-                            os.path.join('#', 'resource', 'c_common')
-    ])
+env.AppendUnique(CPPPATH=[
+    os.path.join(Dir('.').abspath, 'include'),
+    os.path.join('#', 'resource', 'c_common')
+])
 
 if env.get('TARGET_OS') in ['arduino']:
-       env.AppendUnique(CPPPATH = [os.path.join(build_dir, 'resource', 'c_common', 'oic_string', 'include')])
+    env.AppendUnique(CPPPATH=[
+        os.path.join(build_dir, 'resource', 'c_common', 'oic_string',
+                     'include')
+    ])
 if env.get('TARGET_OS') == 'tizen':
-       env.AppendUnique(LIBPATH = [build_dir])
+    env.AppendUnique(LIBPATH=[build_dir])
 else:
-       env.AppendUnique(LIBPATH = [os.path.join(build_dir, 'resource', 'csdk', 'logger')])
+    env.AppendUnique(
+        LIBPATH=[os.path.join(build_dir, 'resource', 'csdk', 'logger')])
 if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
-       env.AppendUnique(CPPDEFINES = ['OIC_SUPPORT_TIZEN_TRACE'])
+    env.AppendUnique(CPPDEFINES=['OIC_SUPPORT_TIZEN_TRACE'])
 
 local_env = env.Clone()
 
@@ -28,10 +33,10 @@ local_env = env.Clone()
 # Therefore we copy it to a .cpp name so it is compiled correctly.
 
 if env.get('TARGET_OS') in ['arduino']:
-       Command("./src/logger.cpp", "./src/logger.c", Copy("$TARGET", "$SOURCE"))
-       logger_src = ['./src/logger.cpp']
+    Command("./src/logger.cpp", "./src/logger.c", Copy("$TARGET", "$SOURCE"))
+    logger_src = ['./src/logger.cpp']
 else:
-       logger_src = ['./src/logger.c', './src/trace.c']
+    logger_src = ['./src/logger.c', './src/trace.c']
 
 if log_level == 'INFO':
        env.AppendUnique(CPPDEFINES = ['SET_LOG_INFO'])
index af6d3ff..a6af7da 100644 (file)
@@ -26,7 +26,7 @@ Import('env')
 rd_env = env.Clone()
 
 if rd_env.get('LOGGING'):
-    rd_env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
+    rd_env.AppendUnique(CPPDEFINES=['-DTB_LOG'])
 
 target_os = env.get('TARGET_OS')
 src_dir = env.get('SRC_DIR')
@@ -35,44 +35,47 @@ rd_mode = env.get('RD_MODE')
 ######################################################################
 # Build flags
 ######################################################################
-rd_env.AppendUnique(CPPPATH = [ '#/resource/csdk/security/include',
-                                'include',
-                                'src/internal',
-                                '#/resource/csdk/include',
-                                '#/resource/csdk/stack/include',
-                                '#/resource/csdk/stack/include/internal',
-                                '#/resource/include',
-                                '#/resource/csdk/logger/include',
-                                '#/resource/oc_logger/include',
-                                '#/resource/csdk/connectivity/api'
+rd_env.AppendUnique(CPPPATH=[
+    '#/resource/csdk/security/include',
+    'include',
+    'src/internal',
+    '#/resource/csdk/include',
+    '#/resource/csdk/stack/include',
+    '#/resource/csdk/stack/include/internal',
+    '#/resource/include',
+    '#/resource/csdk/logger/include',
+    '#/resource/oc_logger/include',
+    '#/resource/csdk/connectivity/api'
 ])
 
 if 'CLIENT' in rd_mode:
-    rd_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
+    rd_env.AppendUnique(CPPDEFINES=['RD_CLIENT'])
 if 'SERVER' in rd_mode:
-    rd_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
+    rd_env.AppendUnique(CPPDEFINES=['RD_SERVER'])
 
 if target_os != 'android':
-    rd_env.PrependUnique(RPATH = [rd_env.get('BUILD_DIR')])
-rd_env.PrependUnique(LIBS = ['octbstack', 'oc', 'oc_logger', 'connectivity_abstraction'])
+    rd_env.PrependUnique(RPATH=[rd_env.get('BUILD_DIR')])
+rd_env.PrependUnique(
+    LIBS=['octbstack', 'oc', 'oc_logger', 'connectivity_abstraction'])
 
 if target_os not in ['windows']:
-    rd_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
+    rd_env.AppendUnique(
+        CXXFLAGS=['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
 else:
-    # Non-Windows platforms find the boost headers under /usr/include or similar path.\r
-    rd_env.AppendUnique(CPPPATH = ['#/extlibs/boost/boost'])
+    # Non-Windows platforms find the boost headers under /usr/include or similar path.
+    rd_env.AppendUnique(CPPPATH=['#/extlibs/boost/boost'])
 
 if target_os == 'android':
-    rd_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
-    rd_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libresource_directory.so'])
-    rd_env.AppendUnique(LIBS = ['gnustl_static'])
+    rd_env.AppendUnique(CXXFLAGS=['-frtti', '-fexceptions'])
+    rd_env.AppendUnique(LINKFLAGS=['-Wl,-soname,libresource_directory.so'])
+    rd_env.AppendUnique(LIBS=['gnustl_static'])
     if not env.get('RELEASE'):
-        rd_env.AppendUnique(LIBS = ['log'])
+        rd_env.AppendUnique(LIBS=['log'])
 
 if target_os in ['linux', 'tizen']:
     rd_env.ParseConfig('pkg-config --cflags --libs sqlite3')
 else:
-    rd_env.AppendUnique(CPPPATH = ['../../../extlibs/sqlite3'])
+    rd_env.AppendUnique(CPPPATH=['../../../extlibs/sqlite3'])
 
 ######################################################################
 # Source files and Targets
@@ -85,17 +88,17 @@ if 'SERVER' in rd_mode:
     rd_src_c += [
         RD_SRC_DIR + 'internal/rd_database.c',
         RD_SRC_DIR + 'rd_server.c',
-        ]
-    if target_os not in ['linux', 'tizen', 'windows'] :
-        rd_src_c += [ '../../../extlibs/sqlite3/sqlite3.c' ]
+    ]
+    if target_os not in ['linux', 'tizen', 'windows']:
+        rd_src_c += ['../../../extlibs/sqlite3/sqlite3.c']
 
 if 'CLIENT' in rd_mode:
     rd_src_c += [RD_SRC_DIR + 'rd_client.c',]
 
 rd_src_all = rd_src_c
 
-if target_os not in ['arduino','darwin','ios']:
-    rd_src_cpp += [ RD_SRC_DIR + 'RDClient.cpp']
+if target_os not in ['arduino', 'darwin', 'ios']:
+    rd_src_cpp += [RD_SRC_DIR + 'RDClient.cpp']
     if 'CLIENT' in rd_mode:
         rd_src_all += rd_src_cpp
 
@@ -114,12 +117,16 @@ rd_env.InstallTarget(rdsdk, 'resource_directory')
 rd_env.UserInstallTargetLib(rdsdk, 'resource_directory')
 
 if 'CLIENT' in rd_mode:
-    rd_env.UserInstallTargetHeader('include/rd_client.h', 'resource', 'rd_client.h')
-    rd_env.UserInstallTargetHeader('include/RDClient.h', 'resource', 'RDClient.h')
+    rd_env.UserInstallTargetHeader(
+        'include/rd_client.h', 'resource', 'rd_client.h')
+    rd_env.UserInstallTargetHeader(
+        'include/RDClient.h', 'resource', 'RDClient.h')
 
 if 'SERVER' in rd_mode:
-    rd_env.UserInstallTargetHeader('include/rd_server.h', 'resource', 'rd_server.h')
-    rd_env.UserInstallTargetHeader('include/rd_database.h', 'resource', 'rd_database.h')
+    rd_env.UserInstallTargetHeader(
+        'include/rd_server.h', 'resource', 'rd_server.h')
+    rd_env.UserInstallTargetHeader(
+        'include/rd_database.h', 'resource', 'rd_database.h')
 
 ######################################################################
 # Samples for the resource directory
index 8eba260..4f54eb3 100644 (file)
@@ -25,7 +25,7 @@
 Import('env')
 
 lib_env = env.Clone()
-SConscript('#resource/third_party_libs.scons', 'lib_env')
+SConscript('#/resource/third_party_libs.scons', 'lib_env')
 
 rd_sample_app_env = lib_env.Clone()
 
@@ -34,43 +34,48 @@ src_dir = env.get('SRC_DIR')
 ######################################################################
 # Build flags
 ######################################################################
-rd_sample_app_env.AppendUnique(CPPPATH = ['../include',
-                                          '../src/internal',
-                                          src_dir + '/resource/csdk/include',
-                                          src_dir + '/resource/csdk/stack/include',
-                                          src_dir + '/resource/csdk/security/include',
-                                          src_dir + '/resource/include',
-                                          src_dir + '/resource/oc_logger/include',])
+rd_sample_app_env.AppendUnique(CPPPATH=[
+    '../include',
+    '../src/internal',
+    src_dir + '/resource/csdk/include',
+    src_dir + '/resource/csdk/stack/include',
+    src_dir + '/resource/csdk/security/include',
+    src_dir + '/resource/include',
+    src_dir + '/resource/oc_logger/include',
+])
 
 if target_os not in ['windows']:
-    rd_sample_app_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
-rd_sample_app_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
-rd_sample_app_env.PrependUnique(LIBS = ['resource_directory', 'octbstack'])
+    rd_sample_app_env.AppendUnique(
+        CXXFLAGS=['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
+rd_sample_app_env.AppendUnique(RPATH=[env.get('BUILD_DIR')])
+rd_sample_app_env.PrependUnique(LIBS=['resource_directory', 'octbstack'])
 
 if env.get('SECURED') == '1':
-    rd_sample_app_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+    rd_sample_app_env.AppendUnique(LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
 
 if env.get('LOGGING'):
-    rd_sample_app_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+    rd_sample_app_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 if rd_sample_app_env.get('RD_MODE'):
     rd_mode = rd_sample_app_env.get('RD_MODE')
     if 'CLIENT' in rd_mode:
-        rd_sample_app_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
+        rd_sample_app_env.AppendUnique(CPPDEFINES=['RD_CLIENT'])
     if 'SERVER' in rd_mode:
-        rd_sample_app_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
+        rd_sample_app_env.AppendUnique(CPPDEFINES=['RD_SERVER'])
 
 ####################################################################
 # Source files and Targets
 ######################################################################
-rd_queryClient = rd_sample_app_env.Program('rd_queryClient', 'rd_queryClient.cpp')
+rd_queryClient = rd_sample_app_env.Program('rd_queryClient',
+                                           'rd_queryClient.cpp')
 
 if 'SERVER' in rd_sample_app_env.get('RD_MODE'):
     rd_server = rd_sample_app_env.Program('rd_server', 'rd_main.c')
     Alias("resource_directory", [rd_server, rd_queryClient])
 
 if 'CLIENT' in rd_sample_app_env.get('RD_MODE'):
-    rd_publishingClient = rd_sample_app_env.Program('rd_publishingClient', 'rd_publishingClient.cpp')
+    rd_publishingClient = rd_sample_app_env.Program('rd_publishingClient',
+                                                    'rd_publishingClient.cpp')
     Alias("resource_directory", [rd_publishingClient, rd_queryClient])
 
 env.AppendTarget('resource_directory')
index 9fe6c55..44570b0 100644 (file)
 # SConscript file for Local PKI google tests
 from tools.scons.RunTest import run_test
 
-gtest_env = SConscript('#extlibs/gtest/SConscript')
+gtest_env = SConscript('#/extlibs/gtest/SConscript')
 lib_env = gtest_env.Clone()
 target_os = lib_env.get('TARGET_OS')
 
 if lib_env.get('RELEASE'):
-    lib_env.AppendUnique(CCFLAGS = ['-Os'])
-    lib_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
+    lib_env.AppendUnique(CCFLAGS=['-Os'])
+    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
-    lib_env.AppendUnique(CCFLAGS = ['-g'])
+    lib_env.AppendUnique(CCFLAGS=['-g'])
 
 if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 # Add third party libraries
-SConscript('#resource/third_party_libs.scons', 'lib_env')
+SConscript('#/resource/third_party_libs.scons', 'lib_env')
 
 if target_os in ['linux']:
-    SConscript('#extlibs/hippomocks/SConscript')
+    SConscript('#/extlibs/hippomocks/SConscript')
 
 rd_test_env = lib_env.Clone()
 
@@ -55,35 +55,35 @@ src_dir = lib_env.get('SRC_DIR')
 ######################################################################
 with_upstream_libcoap = rd_test_env.get('WITH_UPSTREAM_LIBCOAP')
 if with_upstream_libcoap == '1':
-    rd_test_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+    rd_test_env.AppendUnique(CPPPATH=['#extlibs/libcoap/libcoap/include'])
 else:
-    rd_test_env.AppendUnique(CPPPATH = [
-            src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
-            ])
+    rd_test_env.AppendUnique(CPPPATH=[
+        src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
+    ])
 
-rd_test_env.AppendUnique(
-        CPPPATH = [
-                src_dir + '/extlibs/hippomocks/hippomocks',
-                '../include',
-                src_dir + '/resource/include',
-                src_dir + '/resource/csdk/connectivity/api',
-                src_dir + '/resource/csdk/include',
-                src_dir + '/resource/csdk/stack/include',
-                src_dir + '/resource/csdk/security/include',
-                src_dir + '/resource/csdk/stack/test/',
-                src_dir + '/resource/oc_logger/include',])
+rd_test_env.AppendUnique(CPPPATH=[
+    src_dir + '/extlibs/hippomocks/hippomocks',
+    '../include',
+    src_dir + '/resource/include',
+    src_dir + '/resource/csdk/connectivity/api',
+    src_dir + '/resource/csdk/include',
+    src_dir + '/resource/csdk/stack/include',
+    src_dir + '/resource/csdk/security/include',
+    src_dir + '/resource/csdk/stack/test/',
+    src_dir + '/resource/oc_logger/include',
+])
 
-rd_test_env.AppendUnique(RPATH = [lib_env.get('BUILD_DIR')])
-rd_test_env.PrependUnique(LIBS = ['octbstack'])
+rd_test_env.AppendUnique(RPATH=[lib_env.get('BUILD_DIR')])
+rd_test_env.PrependUnique(LIBS=['octbstack'])
 
 if rd_test_env.get('RD_MODE'):
     rd_mode = rd_test_env.get('RD_MODE')
-    rd_test_env.PrependUnique(LIBS = ['resource_directory'])
+    rd_test_env.PrependUnique(LIBS=['resource_directory'])
     if 'CLIENT' in rd_mode:
-        rd_test_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
-        rd_test_env.AppendUnique(LIBS = ['oc', 'oc_logger'])
+        rd_test_env.AppendUnique(CPPDEFINES=['RD_CLIENT'])
+        rd_test_env.AppendUnique(LIBS=['oc', 'oc_logger'])
     if 'SERVER' in rd_mode:
-        rd_test_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
+        rd_test_env.AppendUnique(CPPDEFINES=['RD_SERVER'])
 
 ######################################################################
 # Build Test
index b8d7b13..8c709bd 100644 (file)
@@ -3,55 +3,55 @@ import os
 
 local_env = env.Clone()
 
-local_env.AppendUnique(CPPPATH = [os.path.join(Dir('.').abspath, './include')])
+local_env.AppendUnique(CPPPATH=[os.path.join(Dir('.').abspath, './include')])
 
 if env.get('ROUTING') == 'GW':
-       local_env.AppendUnique(CPPPATH = [
-                               os.path.join(Dir('.').abspath, './../include'),
-                               os.path.join(Dir('.').abspath, './../stack/include'),
-                               os.path.join(Dir('.').abspath, './../stack/include/internal'),
-                               os.path.join(Dir('.').abspath, './../logger'),
-                               os.path.join(Dir('.').abspath, './../../oc_logger/include'),
-                               os.path.join(Dir('.').abspath, './../../c_common/ocrandom/include'),
-                               os.path.join(Dir('.').abspath, './../connectivity/api'),
-                               os.path.join(Dir('.').abspath, './../connectivity/common/inc'),
-                               os.path.join(Dir('.').abspath, './../security/include'),
-                               os.path.join(Dir('.').abspath, './../connectivity/external/inc')
-                       ])
+    local_env.AppendUnique(CPPPATH=[
+        os.path.join(Dir('.').abspath, './../include'),
+        os.path.join(Dir('.').abspath, './../stack/include'),
+        os.path.join(Dir('.').abspath, './../stack/include/internal'),
+        os.path.join(Dir('.').abspath, './../logger'),
+        os.path.join(Dir('.').abspath, './../../oc_logger/include'),
+        os.path.join(Dir('.').abspath, './../../c_common/ocrandom/include'),
+        os.path.join(Dir('.').abspath, './../connectivity/api'),
+        os.path.join(Dir('.').abspath, './../connectivity/common/inc'),
+        os.path.join(Dir('.').abspath, './../security/include'),
+        os.path.join(Dir('.').abspath, './../connectivity/external/inc')
+    ])
 elif env.get('ROUTING') == 'EP':
-       local_env.AppendUnique(CPPPATH = [
-                               os.path.join(Dir('.').abspath, './../include'),
-                               os.path.join(Dir('.').abspath, './../stack/include'),
-                               os.path.join(Dir('.').abspath, './../stack/include/internal'),
-                               os.path.join(Dir('.').abspath, './../logger'),
-                               os.path.join(Dir('.').abspath, './../../oc_logger/include'),
-                               os.path.join(Dir('.').abspath, './../connectivity/api'),
-                               os.path.join(Dir('.').abspath, './../connectivity/common/inc'),
-                               os.path.join(Dir('.').abspath, './../connectivity/external/inc')
-                       ])
+    local_env.AppendUnique(CPPPATH=[
+        os.path.join(Dir('.').abspath, './../include'),
+        os.path.join(Dir('.').abspath, './../stack/include'),
+        os.path.join(Dir('.').abspath, './../stack/include/internal'),
+        os.path.join(Dir('.').abspath, './../logger'),
+        os.path.join(Dir('.').abspath, './../../oc_logger/include'),
+        os.path.join(Dir('.').abspath, './../connectivity/api'),
+        os.path.join(Dir('.').abspath, './../connectivity/common/inc'),
+        os.path.join(Dir('.').abspath, './../connectivity/external/inc')
+    ])
 
 ######################################################################
 # Build flags
 ######################################################################
 
 if env.get('LOGGING') == '1':
-       local_env.AppendUnique(CPPDEFINES=['TB_LOG'])
+    local_env.AppendUnique(CPPDEFINES=['TB_LOG'])
 
 ######################################################################
 # Source files and Targets
 ######################################################################
 
 if env.get('ROUTING') == 'GW':
-       routing_src = [
-               './src/routingutility.c',
-               './src/routingmanager.c',
-               './src/routingtablemanager.c',
-               './src/routingmanagerinterface.c',
-               './src/routingmessageparser.c',
+    routing_src = [
+        './src/routingutility.c',
+        './src/routingmanager.c',
+        './src/routingtablemanager.c',
+        './src/routingmanagerinterface.c',
+        './src/routingmessageparser.c',
     ]
 elif env.get('ROUTING') == 'EP':
-       routing_src = [
-               './src/routingutility.c',
+    routing_src = [
+        './src/routingutility.c',
     ]
 
 routinglib = local_env.StaticLibrary('routingmanager', routing_src)