From a262764e943131e529e16f8f68403cb7bcfbe154 Mon Sep 17 00:00:00 2001 From: Pawel Winogrodzki Date: Tue, 14 Feb 2017 17:19:01 -0800 Subject: [PATCH] IOT-1583: Removing IoTivity libs from scons Check* calls. Due to a scons bug (http://scons.tigris.org/issues/show_bug.cgi?id=3036) part of the build failures were being silently ignored and led to cases where failing code ended up being merged. Additionally, scons weren't picking up changes in files influenced by the mentioned bug, so it required doing a clean build every time. Change-Id: Ib63fb1105bceafae59573aa0c15af279e8ffdb6d Signed-off-by: Pawel Winogrodzki Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/17641 Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai Reviewed-by: George Nash Reviewed-by: Mike Fenelon --- build_common/external_libs.scons | 2 +- extlibs/libcoap/SConscript | 2 +- resource/c_common/SConscript | 2 +- service/easy-setup/enrollee/SConscript | 92 ++++++++--------- service/easy-setup/enrollee/unittests/SConscript | 19 ++-- service/easy-setup/mediator/richsdk/SConscript | 10 +- .../mediator/richsdk/unittests/SConscript | 31 +++--- .../notification/cpp-wrapper/consumer/SConscript | 17 +++- .../cpp-wrapper/examples/linux/SConscript | 50 +++++----- .../notification/cpp-wrapper/provider/SConscript | 110 +++++++++++---------- .../notification/cpp-wrapper/unittest/SConscript | 21 ++-- service/resource-container/SConscript | 8 +- .../src/inputSensors/HeightSensorApp/SConscript | 6 +- .../BMISensorBundle/src/inputSensors/SConscript | 13 ++- .../src/inputSensors/WeightSensorApp/SConscript | 6 +- .../src/inputSensors/SConscript | 13 ++- .../src/inputSensors/THSensorApp/SConscript | 6 +- .../src/inputSensors/THSensorApp1/SConscript | 6 +- service/resource-container/unittests/SConscript | 25 +++-- service/resource-encapsulation/SConscript | 4 + .../examples/linux/SConscript | 12 ++- .../linux/secureResourceExample/SConscript | 8 +- .../resource-encapsulation/src/common/SConscript | 6 +- .../src/resourceBroker/unittest/SConscript | 18 ++-- .../src/resourceCache/unittests/SConscript | 18 ++-- .../src/serverBuilder/SConscript | 4 + .../resource-encapsulation/unittests/SConscript | 6 +- service/scene-manager/SConscript | 19 ++-- service/scene-manager/sampleapp/linux/SConscript | 15 ++- service/scene-manager/unittests/SConscript | 23 +++-- service/simulator/examples/client/SConscript | 10 +- service/simulator/examples/server/SConscript | 10 +- service/third_party_libs.scons | 4 +- 33 files changed, 368 insertions(+), 228 deletions(-) diff --git a/build_common/external_libs.scons b/build_common/external_libs.scons index 57f3fd0..22a6c1a 100644 --- a/build_common/external_libs.scons +++ b/build_common/external_libs.scons @@ -67,7 +67,7 @@ if target_os not in ['windows']: # @param script - the building script, by default, it's 'SConscript' # def __prepare_lib(ienv, libname, lib = None, path = None, script = None): - p_env = ienv.Clone() + p_env = ienv.Clone(LIBS = []) if p_env.GetOption('clean') or p_env.GetOption('help'): return diff --git a/extlibs/libcoap/SConscript b/extlibs/libcoap/SConscript index 8b87d67..b542734 100644 --- a/extlibs/libcoap/SConscript +++ b/extlibs/libcoap/SConscript @@ -154,7 +154,7 @@ if with_upstream_libcoap == '1': lib_prefix = '' + str(libcoap_env.get('PREFIX')) if (not os.path.isfile(config_h_file_path)) and (not env.GetOption('clean')): - conf = Configure(libcoap_env) + conf = Configure(libcoap_env.Clone(LIBS = [])) config_h_header = ''' /* **************************************************************************** diff --git a/resource/c_common/SConscript b/resource/c_common/SConscript index c0c414f..98ce6b2 100644 --- a/resource/c_common/SConscript +++ b/resource/c_common/SConscript @@ -32,7 +32,7 @@ src_dir = env.get('SRC_DIR') ###################################################################### config_h_file_path = os.path.join(src_dir, 'resource', 'c_common', 'iotivity_config.h') if (not os.path.isfile(config_h_file_path)) and (not env.GetOption('clean')): - conf = Configure(env.Clone()) + conf = Configure(env.Clone(LIBS = [])) config_h_header = ''' /* **************************************************************************** diff --git a/service/easy-setup/enrollee/SConscript b/service/easy-setup/enrollee/SConscript index f29b41d..083d5de 100644 --- a/service/easy-setup/enrollee/SConscript +++ b/service/easy-setup/enrollee/SConscript @@ -39,33 +39,33 @@ if enrollee_env.get('LOGGING'): # Build flags ###################################################################### enrollee_env.PrependUnique(CPPPATH = [ - enrollee_env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include', - enrollee_env.get('SRC_DIR') + '/resource/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/logger/include', - enrollee_env.get('SRC_DIR') + '/resource/oc_logger/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/stack/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/logger/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/security/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/connectivity/api', - enrollee_env.get('SRC_DIR') + '/extlibs/cjson', - enrollee_env.get('SRC_DIR') + '/service/easy-setup/inc', - enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc', - enrollee_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src']) + '#/resource/c_common/oic_malloc/include', + '#/resource/include', + '#/resource/csdk/logger/include', + '#/resource/oc_logger/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/csdk/logger/include', + '#/resource/csdk/security/include', + '#/resource/csdk/connectivity/api', + '#/extlibs/cjson', + '#/service/easy-setup/inc', + '#/service/easy-setup/enrollee/inc', + '#/service/easy-setup/enrollee/src']) if target_os not in ['linux', 'tizen']: enrollee_env.PrependUnique(CPPPATH = [ - enrollee_env.get('SRC_DIR') + '/extlibs/sqlite3']) + '#extlibs/sqlite3']) if enrollee_env.get('SECURED') == '1': - enrollee_env.AppendUnique(CPPPATH = [ - enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include', - enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal', - enrollee_env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm']) - enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) + enrollee_env.AppendUnique(CPPPATH = [ + '#/resource/csdk/security/provisioning/include', + '#/resource/csdk/security/provisioning/include/internal', + '#/resource/csdk/security/provisioning/include/oxm']) + enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) if target_os not in ['windows']: - enrollee_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x']) + enrollee_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x']) if not env.get('RELEASE'): enrollee_env.PrependUnique(LIBS = ['gcov']) @@ -75,13 +75,13 @@ if not env.get('RELEASE'): # Linux Enrollee ###################################################################### if target_os in ['linux']: - enrollee_env.AppendUnique(LIBS = ['pthread', 'dl']) - enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')]) - enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')]) - enrollee_env.AppendUnique(CXXFLAGS = ['-pthread']) - enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction']) - if enrollee_env.get('SECURED') == '1': - enrollee_env.PrependUnique(LIBS = ['ocprovision', 'ocpmapi']) + enrollee_env.AppendUnique(LIBS = ['pthread', 'dl']) + enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')]) + enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')]) + enrollee_env.AppendUnique(CXXFLAGS = ['-pthread']) + enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction']) + if enrollee_env.get('SECURED') == '1': + enrollee_env.PrependUnique(LIBS = ['ocprovision', 'ocpmapi']) ###################################################################### # Tizen Enrollee @@ -96,9 +96,9 @@ if target_os == 'tizen': # Arduino Enrollee ###################################################################### if target_os == 'arduino': - enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')]) - enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')]) - enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction']) + enrollee_env.AppendUnique(LIBPATH = [enrollee_env.get('BUILD_DIR')]) + enrollee_env.AppendUnique(RPATH = [enrollee_env.get('BUILD_DIR')]) + enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'pthread', 'connectivity_abstraction']) ###################################################################### # Source files and Targets @@ -106,27 +106,27 @@ if target_os == 'arduino': es_enrollee_src = None if target_os in ['linux', 'tizen']: - es_enrollee_common_src = ['./src/easysetup.c','./src/resourcehandler.c'] - enrollee_sdk_shared = enrollee_env.SharedLibrary('ESEnrolleeSDK', es_enrollee_common_src) - enrollee_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', es_enrollee_common_src) - enrollee_env.InstallTarget([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee') - enrollee_env.UserInstallTargetLib([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee') - enrollee_env.UserInstallTargetHeader('inc/ESEnrolleeCommon.h', 'service/easy-setup', 'ESEnrolleeCommon.h') - enrollee_env.UserInstallTargetHeader('inc/easysetup.h', 'service/easy-setup', 'easysetup.h') + es_enrollee_common_src = ['./src/easysetup.c','./src/resourcehandler.c'] + enrollee_sdk_shared = enrollee_env.SharedLibrary('ESEnrolleeSDK', es_enrollee_common_src) + enrollee_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', es_enrollee_common_src) + enrollee_env.InstallTarget([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee') + enrollee_env.UserInstallTargetLib([enrollee_sdk_shared, enrollee_sdk_static], 'libESEnrollee') + enrollee_env.UserInstallTargetHeader('inc/ESEnrolleeCommon.h', 'service/easy-setup', 'ESEnrolleeCommon.h') + enrollee_env.UserInstallTargetHeader('inc/easysetup.h', 'service/easy-setup', 'easysetup.h') if target_os == 'arduino': - es_enrollee_common_src = ['./src/easysetup.c','./src/resourcehandler.c'] - enrollee_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', es_enrollee_common_src) - enrollee_env.InstallTarget(enrollee_sdk_static, 'libESEnrolleeSDK') - enrollee_env.UserInstallTargetLib(enrollee_sdk_static, 'libESEnrollee') + es_enrollee_common_src = ['./src/easysetup.c','./src/resourcehandler.c'] + enrollee_sdk_static = enrollee_env.StaticLibrary('ESEnrolleeSDK', es_enrollee_common_src) + enrollee_env.InstallTarget(enrollee_sdk_static, 'libESEnrolleeSDK') + enrollee_env.UserInstallTargetLib(enrollee_sdk_static, 'libESEnrollee') #Go to build sample apps #if target_os == 'arduino': -# SConscript('../sampleapp/enrollee/arduino/SConscript') +# SConscript('../sampleapp/enrollee/arduino/SConscript') if target_os in ['linux']: - SConscript('../sampleapp/enrollee/linux/SConscript') - #Build UnitTestcases for Enrollee - if enrollee_env.get('SECURED') == '0': - SConscript('../enrollee/unittests/SConscript') + SConscript('../sampleapp/enrollee/linux/SConscript') + #Build UnitTestcases for Enrollee + if enrollee_env.get('SECURED') == '0': + SConscript('../enrollee/unittests/SConscript') diff --git a/service/easy-setup/enrollee/unittests/SConscript b/service/easy-setup/enrollee/unittests/SConscript index 5304c82..4ffe2d4 100644 --- a/service/easy-setup/enrollee/unittests/SConscript +++ b/service/easy-setup/enrollee/unittests/SConscript @@ -65,13 +65,18 @@ if target_os not in ['windows', 'winrt']: easysetup_test_env.AppendUnique(CXXFLAGS = ['-pthread']) easysetup_test_env.AppendUnique(LIBS = ['pthread']) -easysetup_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master', gtest_dir + '/include']) - -easysetup_test_env.AppendUnique(CPPPATH = [src_dir + '/resource/include', - src_dir + '/resource/csdk/connectivity/api', - src_dir + '/service/easy-setup/inc', - src_dir + '/service/easy-setup/enrollee/inc', - src_dir + '/service/easy-setup/mediator/richsdk/inc']) +easysetup_test_env.PrependUnique(CPPPATH = [ + '#/extlibs/hippomocks-master', + gtest_dir + '/include', + '#/resource/include', + '#/resource/csdk/connectivity/api', + '#/resource/csdk/stack/include', + '#/resource/csdk/include', + '#/resource/oc_logger/include', + '#/service/easy-setup/inc', + '#/service/easy-setup/enrollee/inc', + '#/service/easy-setup/mediator/richsdk/inc' +]) if easysetup_test_env.get('SECURED') == '1': easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) diff --git a/service/easy-setup/mediator/richsdk/SConscript b/service/easy-setup/mediator/richsdk/SConscript index 7cc21b2..7977b21 100755 --- a/service/easy-setup/mediator/richsdk/SConscript +++ b/service/easy-setup/mediator/richsdk/SConscript @@ -57,7 +57,15 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -easy_setup_env.AppendUnique(CPPPATH = ['inc', 'src', '../../inc']) +easy_setup_env.AppendUnique(CPPPATH = [ + 'inc', + 'src', + '../../inc', + '#/resource/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/oc_logger/include' + ]) if target_os not in ['windows']: easy_setup_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x']) diff --git a/service/easy-setup/mediator/richsdk/unittests/SConscript b/service/easy-setup/mediator/richsdk/unittests/SConscript index 50350d5..2766d18 100644 --- a/service/easy-setup/mediator/richsdk/unittests/SConscript +++ b/service/easy-setup/mediator/richsdk/unittests/SConscript @@ -25,13 +25,13 @@ Import('env') if env.get('RELEASE'): - env.AppendUnique(CCFLAGS = ['-Os']) - env.AppendUnique(CPPDEFINES = ['NDEBUG']) + env.AppendUnique(CCFLAGS = ['-Os']) + env.AppendUnique(CPPDEFINES = ['NDEBUG']) else: - env.AppendUnique(CCFLAGS = ['-g']) + env.AppendUnique(CCFLAGS = ['-g']) if env.get('LOGGING'): - env.AppendUnique(CPPDEFINES = ['TB_LOG']) + env.AppendUnique(CPPDEFINES = ['TB_LOG']) lib_env = env.Clone() SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env') @@ -62,17 +62,22 @@ if target_os not in ['windows', 'winrt']: easysetup_test_env.AppendUnique(CXXFLAGS = ['-pthread']) easysetup_test_env.AppendUnique(LIBS = ['pthread']) -easysetup_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master', gtest_dir + '/include']) - -easysetup_test_env.AppendUnique(CPPPATH = [ src_dir + '/resource/include', - src_dir + '/resource/csdk/connectivity/api', - src_dir + '/service/easy-setup/mediator/richsdk/inc', - src_dir + '/service/easy-setup/inc', - src_dir + '/service/easy-setup/enrollee/inc']) +easysetup_test_env.PrependUnique(CPPPATH = [ + '#/extlibs/hippomocks-master', + gtest_dir + '/include', + '#/resource/csdk/include', + '#/resource/csdk/connectivity/api', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include', + '#/service/easy-setup/inc', + '#/service/easy-setup/enrollee/inc', + '#/service/easy-setup/mediator/richsdk/inc' +]) if env.get('SECURED') == '1': - if env.get('WITH_TCP') == True: - easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) + if env.get('WITH_TCP') == True: + easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) ###################################################################### # Build Test ###################################################################### diff --git a/service/notification/cpp-wrapper/consumer/SConscript b/service/notification/cpp-wrapper/consumer/SConscript index e66feda..3de1206 100755 --- a/service/notification/cpp-wrapper/consumer/SConscript +++ b/service/notification/cpp-wrapper/consumer/SConscript @@ -43,11 +43,18 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -notification_env.AppendUnique(CPPPATH = ['../../include']) -notification_env.AppendUnique(CPPPATH = ['inc']) -notification_env.AppendUnique(CPPPATH = ['../common']) -notification_env.AppendUnique(CPPPATH = ['../provider/inc']) -notification_env.AppendUnique(CPPPATH = ['../../src/common']) +notification_env.AppendUnique(CPPPATH = [ + '../../include', + 'inc', + '../common', + '../provider/inc', + '../../src/common', + '#/resource/csdk/security/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) notification_env.PrependUnique(LIBS = [ 'oc_logger', diff --git a/service/notification/cpp-wrapper/examples/linux/SConscript b/service/notification/cpp-wrapper/examples/linux/SConscript index 2a71b5f..f6dd204 100755 --- a/service/notification/cpp-wrapper/examples/linux/SConscript +++ b/service/notification/cpp-wrapper/examples/linux/SConscript @@ -32,44 +32,48 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -notification_sample_env.AppendUnique(CPPPATH = ['../../../include']) -notification_sample_env.AppendUnique(CPPPATH = ['../../provider/inc']) -notification_sample_env.AppendUnique(CPPPATH = ['../../consumer/inc']) -notification_sample_env.AppendUnique(CPPPATH = ['../../common']) -notification_sample_env.AppendUnique(CPPPATH = ['../../../../../resource/csdk/include']) -notification_sample_env.AppendUnique(CPPPATH = ['../../../../../resource/csdk/stack/include']) -notification_sample_env.AppendUnique(CPPPATH = ['../../../../../resource/csdk/connectivity/api']) -notification_sample_env.AppendUnique(CPPPATH = ['../../../src/common']) +notification_sample_env.AppendUnique(CPPPATH = [ + '../../../include', + '../../provider/inc', + '../../consumer/inc', + '../../common', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/csdk/connectivity/api', + '#/resource/include', + '#/resource/oc_logger/include' + '../../../src/common' + ]) notification_sample_env.PrependUnique(LIBS = [ - 'liboctbstack', - 'oc_logger', - 'oc', - 'connectivity_abstraction', - 'libcoap', - 'resource_directory' - ]) + 'liboctbstack', + 'oc_logger', + 'oc', + 'connectivity_abstraction', + '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']) + 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']) + notification_sample_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) if target_os == 'linux': - notification_sample_env.AppendUnique(LIBS = ['pthread']) + notification_sample_env.AppendUnique(LIBS = ['pthread']) if target_os == 'android': - notification_sample_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) - notification_sample_env.AppendUnique(LIBS = ['gnustl_shared','log']) + notification_sample_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) + notification_sample_env.AppendUnique(LIBS = ['gnustl_shared','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']) + notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD']) with_mq = env.get('WITH_MQ') if 'SUB' in with_mq: @@ -85,9 +89,9 @@ if 'BROKER' in with_mq: print "MQ Broker support" if env.get('WITH_TCP') == True: - notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP']) + notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP']) if env.get('SECURED') == '1': - notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) + notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) #################################################################### # Source files and Targets diff --git a/service/notification/cpp-wrapper/provider/SConscript b/service/notification/cpp-wrapper/provider/SConscript index d94dd35..630669c 100755 --- a/service/notification/cpp-wrapper/provider/SConscript +++ b/service/notification/cpp-wrapper/provider/SConscript @@ -26,13 +26,13 @@ import platform Import('env') if env.get('RELEASE'): - env.AppendUnique(CCFLAGS = ['-Os']) - env.AppendUnique(CPPDEFINES = ['NDEBUG']) + env.AppendUnique(CCFLAGS = ['-Os']) + env.AppendUnique(CPPDEFINES = ['NDEBUG']) else: - env.AppendUnique(CCFLAGS = ['-g']) + env.AppendUnique(CCFLAGS = ['-g']) if env.get('LOGGING'): - env.AppendUnique(CPPDEFINES = ['TB_LOG']) + env.AppendUnique(CPPDEFINES = ['TB_LOG']) lib_env = env.Clone() SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env') @@ -43,31 +43,37 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -notification_env.AppendUnique(CPPPATH = ['../../include']) -notification_env.AppendUnique(CPPPATH = ['inc']) -notification_env.AppendUnique(CPPPATH = ['../common']) -notification_env.AppendUnique(CPPPATH = ['../consumer/inc']) -notification_env.AppendUnique(CPPPATH = ['../../src/common']) -notification_env.AppendUnique(CPPPATH = ['#/resource/csdk/security/include']) +notification_env.AppendUnique(CPPPATH = [ + '../../include', + 'inc', + '../common', + '../consumer/inc', + '../../src/common', + '#/resource/csdk/security/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) notification_env.PrependUnique(LIBS = [ - 'oc_logger', - 'oc', - 'octbstack', - 'notification_provider', - 'resource_directory' - ]) + 'oc_logger', + 'oc', + 'octbstack', + 'notification_provider', + 'resource_directory' + ]) notification_env.AppendUnique(CXXFLAGS = ['-std=c++0x','-frtti']) if target_os not in ['windows', 'winrt']: - notification_env.AppendUnique(CCFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0']) + notification_env.AppendUnique(CCFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0']) if target_os not in ['darwin', 'ios', 'windows', 'winrt']: - notification_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) + notification_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) if target_os == 'linux': - notification_env.AppendUnique(LIBS = ['pthread']) - + notification_env.AppendUnique(LIBS = ['pthread']) + if target_os == 'android': notification_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) notification_env.PrependUnique(LIBS = ['gnustl_shared', 'log']) @@ -77,7 +83,7 @@ if not env.get('RELEASE') and target_os not in ['ios']: notification_env.AppendUnique(CCFLAGS = ['--coverage']) if env.get('WITH_CLOUD') == True: - notification_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD']) + notification_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD']) with_mq = env.get('WITH_MQ') if 'SUB' in with_mq: @@ -97,29 +103,29 @@ if 'BROKER' in with_mq: notification_jni_provider_env = notification_env.Clone() notificationCommonStaticObjs = [ - notification_env.Object('../common/NSMediaContents.cpp'), - notification_env.Object('../common/NSMessage.cpp'), - notification_env.Object('../common/NSSyncInfo.cpp'), - notification_env.Object('../common/NSTopic.cpp'), - notification_env.Object('../common/NSTopicsList.cpp')] + notification_env.Object('../common/NSMediaContents.cpp'), + notification_env.Object('../common/NSMessage.cpp'), + notification_env.Object('../common/NSSyncInfo.cpp'), + notification_env.Object('../common/NSTopic.cpp'), + notification_env.Object('../common/NSTopicsList.cpp')] notificationCommonSharedObjs = [ - notification_env.SharedObject('../common/NSMediaContents.cpp'), - notification_env.SharedObject('../common/NSMessage.cpp'), - notification_env.SharedObject('../common/NSSyncInfo.cpp'), - notification_env.SharedObject('../common/NSTopic.cpp'), - notification_env.SharedObject('../common/NSTopicsList.cpp')] + notification_env.SharedObject('../common/NSMediaContents.cpp'), + notification_env.SharedObject('../common/NSMessage.cpp'), + notification_env.SharedObject('../common/NSSyncInfo.cpp'), + notification_env.SharedObject('../common/NSTopic.cpp'), + notification_env.SharedObject('../common/NSTopicsList.cpp')] notification_provider_src = [ - env.Glob('src/*.cpp'),notificationCommonSharedObjs] + env.Glob('src/*.cpp'),notificationCommonSharedObjs] if target_os not in ['ios']: - providersdk = notification_env.SharedLibrary('notification_provider_wrapper', notification_provider_src) - notification_env.InstallTarget(providersdk, 'libnotification_provider_wrapper') - notification_env.UserInstallTargetLib(providersdk, 'libnotification_provider_wrapper') + providersdk = notification_env.SharedLibrary('notification_provider_wrapper', notification_provider_src) + notification_env.InstallTarget(providersdk, 'libnotification_provider_wrapper') + notification_env.UserInstallTargetLib(providersdk, 'libnotification_provider_wrapper') notification_provider_src = [ - env.Glob('src/*.cpp'),notificationCommonStaticObjs] + env.Glob('src/*.cpp'),notificationCommonStaticObjs] providersdk = notification_env.StaticLibrary('notification_provider_wrapper', notification_provider_src) notification_env.InstallTarget(providersdk, 'libnotification_provider_wrapper') @@ -134,24 +140,24 @@ Export('notificationCommonSharedObjs') # Source files and Targets for Provider Jni ###################################################################### if target_os == 'android': - notification_jni_provider_env.AppendUnique(CPPPATH = ['../../../../extlibs/boost/boost_1_58_0']) - notification_jni_provider_env.AppendUnique(CPPPATH = ['../../../../java/jni']) - notification_jni_provider_env.AppendUnique(CPPPATH = ['../../android/notification-service/src/main/jni/common']) - notification_jni_provider_env.AppendUnique(CPPPATH = ['../../android/notification-service/src/main/jni/provider']) + notification_jni_provider_env.AppendUnique(CPPPATH = ['../../../../extlibs/boost/boost_1_58_0']) + notification_jni_provider_env.AppendUnique(CPPPATH = ['../../../../java/jni']) + notification_jni_provider_env.AppendUnique(CPPPATH = ['../../android/notification-service/src/main/jni/common']) + notification_jni_provider_env.AppendUnique(CPPPATH = ['../../android/notification-service/src/main/jni/provider']) - notification_jni_provider_env.PrependUnique(LIBS = [ - 'notification_provider_wrapper' - ]) + notification_jni_provider_env.PrependUnique(LIBS = [ + 'notification_provider_wrapper' + ]) - notificationJniCommonSharedObjs = [ - notification_jni_provider_env.SharedObject('../../android/notification-service/src/main/jni/common/JniNotificationCommon.cpp')] + notificationJniCommonSharedObjs = [ + notification_jni_provider_env.SharedObject('../../android/notification-service/src/main/jni/common/JniNotificationCommon.cpp')] - notification_provider_jni_src = [ - env.Glob('../../android/notification-service/src/main/jni/provider/*.cpp'), - notificationJniCommonSharedObjs] + notification_provider_jni_src = [ + env.Glob('../../android/notification-service/src/main/jni/provider/*.cpp'), + notificationJniCommonSharedObjs] - providerJni = notification_jni_provider_env.SharedLibrary('notification_provider_jni', notification_provider_jni_src) - notification_jni_provider_env.InstallTarget(providerJni, 'libnotification_provider_jni') - notification_jni_provider_env.UserInstallTargetLib(providerJni, 'libnotification_provider_jni') + providerJni = notification_jni_provider_env.SharedLibrary('notification_provider_jni', notification_provider_jni_src) + notification_jni_provider_env.InstallTarget(providerJni, 'libnotification_provider_jni') + notification_jni_provider_env.UserInstallTargetLib(providerJni, 'libnotification_provider_jni') - Export('notificationJniCommonSharedObjs') + Export('notificationJniCommonSharedObjs') diff --git a/service/notification/cpp-wrapper/unittest/SConscript b/service/notification/cpp-wrapper/unittest/SConscript index ab047ed..ddef6cd 100644 --- a/service/notification/cpp-wrapper/unittest/SConscript +++ b/service/notification/cpp-wrapper/unittest/SConscript @@ -69,13 +69,20 @@ notification_wrapper_test_env.AppendUnique(LINKFLAGS = ['-Wl,--no-as-needed']) notification_wrapper_test_env.AppendUnique(CXXFLAGS = ['-pthread']) notification_wrapper_test_env.AppendUnique(LIBS = ['pthread']) -notification_wrapper_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master', gtest_dir + '/include']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../provider/inc']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../consumer/inc']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../common']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../../include']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../../src/provider']) -notification_wrapper_test_env.AppendUnique(CPPPATH = ['../../src/consumer']) +notification_wrapper_test_env.PrependUnique(CPPPATH = [ + '#/extlibs/hippomocks-master', + gtest_dir + '/include', + '../provider/inc', + '../consumer/inc', + '../common', + '../../include', + '../../src/provider', + '../../src/consumer', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) ###################################################################### # Build Test diff --git a/service/resource-container/SConscript b/service/resource-container/SConscript index 09c98c4..8b05653 100644 --- a/service/resource-container/SConscript +++ b/service/resource-container/SConscript @@ -65,8 +65,12 @@ if int(containerJavaSupport): resource_container_env.AppendUnique( CPPPATH = [ - env.get('SRC_DIR')+'/extlibs', - '../resource-encapsulation/include', + '#/extlibs', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include', + '#/service/resource-encapsulation/include', 'include', 'bundle-api/include', 'src' diff --git a/service/resource-container/examples/BMISensorBundle/src/inputSensors/HeightSensorApp/SConscript b/service/resource-container/examples/BMISensorBundle/src/inputSensors/HeightSensorApp/SConscript index 7548813..1237a8d 100644 --- a/service/resource-container/examples/BMISensorBundle/src/inputSensors/HeightSensorApp/SConscript +++ b/service/resource-container/examples/BMISensorBundle/src/inputSensors/HeightSensorApp/SConscript @@ -2,12 +2,10 @@ # linux sample app build script ## -Import('env') +Import('env linux_sample_env') # Add third party libraries -lib_env = env.Clone() -SConscript('#service/third_party_libs.scons', 'lib_env') -linux_sample_env = lib_env.Clone() +SConscript('#service/third_party_libs.scons', exports = { 'lib_env' : linux_sample_env }) ###################################################################### # Build flags diff --git a/service/resource-container/examples/BMISensorBundle/src/inputSensors/SConscript b/service/resource-container/examples/BMISensorBundle/src/inputSensors/SConscript index b4e271e..3e1e92b 100644 --- a/service/resource-container/examples/BMISensorBundle/src/inputSensors/SConscript +++ b/service/resource-container/examples/BMISensorBundle/src/inputSensors/SConscript @@ -22,6 +22,15 @@ Import('env') target_os = env.get('TARGET_OS') +linux_sample_env = env.Clone() + +linux_sample_env.AppendUnique(CPPPATH = [ + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) + if target_os in ['linux']: - SConscript('HeightSensorApp/SConscript') - SConscript('WeightSensorApp/SConscript') \ No newline at end of file + SConscript('HeightSensorApp/SConscript', 'linux_sample_env') + SConscript('WeightSensorApp/SConscript', 'linux_sample_env') \ No newline at end of file diff --git a/service/resource-container/examples/BMISensorBundle/src/inputSensors/WeightSensorApp/SConscript b/service/resource-container/examples/BMISensorBundle/src/inputSensors/WeightSensorApp/SConscript index 10cd7d6..626720e 100644 --- a/service/resource-container/examples/BMISensorBundle/src/inputSensors/WeightSensorApp/SConscript +++ b/service/resource-container/examples/BMISensorBundle/src/inputSensors/WeightSensorApp/SConscript @@ -2,12 +2,10 @@ # linux sample app build script ## -Import('env') +Import('env linux_sample_env') # Add third party libraries -lib_env = env.Clone() -SConscript('#service/third_party_libs.scons', 'lib_env') -linux_sample_env = lib_env.Clone() +SConscript('#service/third_party_libs.scons', exports = { 'lib_env' : linux_sample_env }) ###################################################################### # Build flags diff --git a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/SConscript b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/SConscript index 497a6e4..82350b5 100644 --- a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/SConscript +++ b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/SConscript @@ -22,6 +22,15 @@ Import('env') target_os = env.get('TARGET_OS') +linux_sample_env = env.Clone() + +linux_sample_env.AppendUnique(CPPPATH = [ + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) + if target_os in ['linux'] : - SConscript('THSensorApp/SConscript') - SConscript('THSensorApp1/SConscript') + SConscript('THSensorApp/SConscript', 'linux_sample_env') + SConscript('THSensorApp1/SConscript', 'linux_sample_env') diff --git a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp/SConscript b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp/SConscript index 9cb35f7..f671761 100644 --- a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp/SConscript +++ b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp/SConscript @@ -2,12 +2,10 @@ # linux sample sensor app build script ## -Import('env') +Import('env linux_sample_env') # Add third party libraries -lib_env = env.Clone() -SConscript('#service/third_party_libs.scons', 'lib_env') -linux_sample_env = lib_env.Clone() +SConscript('#service/third_party_libs.scons', exports = { 'lib_env' : linux_sample_env }) ###################################################################### # Build flags diff --git a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp1/SConscript b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp1/SConscript index 7643066..173e190 100644 --- a/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp1/SConscript +++ b/service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp1/SConscript @@ -2,12 +2,10 @@ # linux sample sensor app build script ## -Import('env') +Import('env linux_sample_env') # Add third party libraries -lib_env = env.Clone() -SConscript('#service/third_party_libs.scons', 'lib_env') -linux_sample_env = lib_env.Clone() +SConscript('#service/third_party_libs.scons', exports = { 'lib_env' : linux_sample_env }) ###################################################################### # Build flags diff --git a/service/resource-container/unittests/SConscript b/service/resource-container/unittests/SConscript index c4ac7cb..4b38a3d 100644 --- a/service/resource-container/unittests/SConscript +++ b/service/resource-container/unittests/SConscript @@ -83,12 +83,16 @@ if int(containerJavaSupport): ###################################################################### container_gtest_env.AppendUnique( CPPPATH = [ - src_dir + '/extlibs', + '#/extlibs', '../include', '../../resource-encapsulation/include', '../../resource-encapsulation/src/common/utils/include', '../bundle-api/include', - '../src' + '../src', + '#/resource/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/oc_logger/include' ]) if int(containerJavaSupport): @@ -120,10 +124,19 @@ if int(containerJavaSupport): container_gtest_env.AppendUnique(LIBPATH = [os.environ['JAVA_LIB']]) except KeyError: print '' -container_gtest_env.PrependUnique(LIBS = ['rcs_container', 'rcs_client', 'rcs_server', 'rcs_common', - 'oc','octbstack', 'oc_logger', 'oc_logger_core', - 'connectivity_abstraction', - 'gtest', 'gtest_main']) +container_gtest_env.PrependUnique(LIBS = [ + 'rcs_container', + 'rcs_client', + 'rcs_server', + 'rcs_common', + 'oc', + 'octbstack', + 'oc_logger', + 'oc_logger_core', + 'connectivity_abstraction', + 'gtest', + 'gtest_main', + 'boost_system']) if int(containerJavaSupport): try: diff --git a/service/resource-encapsulation/SConscript b/service/resource-encapsulation/SConscript index 31a8dfe..84d9fdd 100644 --- a/service/resource-encapsulation/SConscript +++ b/service/resource-encapsulation/SConscript @@ -56,6 +56,10 @@ resourceClient_env = lib_env.Clone() ###################################################################### resourceClient_env.AppendUnique(CPPPATH = [ 'include', + '#/resource/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/oc_logger/include', 'src/common/primitiveResource/include', 'src/common/expiryTimer/include', 'src/common/utils/include', diff --git a/service/resource-encapsulation/examples/linux/SConscript b/service/resource-encapsulation/examples/linux/SConscript index 90fbd58..0753543 100644 --- a/service/resource-encapsulation/examples/linux/SConscript +++ b/service/resource-encapsulation/examples/linux/SConscript @@ -39,10 +39,16 @@ sample_env.AppendUnique(LIBS = [ 'rcs_common', 'pthread' ]) -sample_env.AppendUnique(CPPPATH = ['../../include']) +sample_env.AppendUnique(CPPPATH = [ + '../../include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) if env.get('SECURED') == '1': - sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) + sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) if 'rt' in sample_env.get('LIBS'): sample_env.Append(LIBS = ['rt']) @@ -70,4 +76,4 @@ nestedAttributesServer = server_env.Program('nestedAttributesServer', 'NestedAtt # ##### Build the RE Secure Resource Example ##### ###################################################################### if env.get('SECURED') == '1': - SConscript('secureResourceExample/SConscript') + SConscript('secureResourceExample/SConscript') diff --git a/service/resource-encapsulation/examples/linux/secureResourceExample/SConscript b/service/resource-encapsulation/examples/linux/secureResourceExample/SConscript index 99a296e..3222399 100644 --- a/service/resource-encapsulation/examples/linux/secureResourceExample/SConscript +++ b/service/resource-encapsulation/examples/linux/secureResourceExample/SConscript @@ -39,7 +39,13 @@ sample_env.AppendUnique(LIBS = [ 'pthread', 'mbedtls', 'mbedx509', 'mbedcrypto' ]) -sample_env.AppendUnique(CPPPATH = ['../../../include']) +sample_env.AppendUnique(CPPPATH = [ + '../../../include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) if env.get('SECURED') == '1': sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) diff --git a/service/resource-encapsulation/src/common/SConscript b/service/resource-encapsulation/src/common/SConscript index 6539bea..189bc45 100644 --- a/service/resource-encapsulation/src/common/SConscript +++ b/service/resource-encapsulation/src/common/SConscript @@ -38,7 +38,11 @@ src_dir = rcs_common_env.get('SRC_DIR') # Build flags ###################################################################### rcs_common_env.AppendUnique(CPPPATH = [ - rcs_common_env.get('SRC_DIR')+'/extlibs', + '#/extlibs', + '#/resource/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/oc_logger/include', '../../include', 'primitiveResource/include']) diff --git a/service/resource-encapsulation/src/resourceBroker/unittest/SConscript b/service/resource-encapsulation/src/resourceBroker/unittest/SConscript index b9ddb8c..2003c25 100644 --- a/service/resource-encapsulation/src/resourceBroker/unittest/SConscript +++ b/service/resource-encapsulation/src/resourceBroker/unittest/SConscript @@ -47,12 +47,18 @@ target_os = broker_test_env.get('TARGET_OS') # Build flags ###################################################################### -broker_test_env.AppendUnique(CPPPATH = ['../include']) -broker_test_env.AppendUnique(CPPPATH = ['../../../include']) -broker_test_env.AppendUnique(CPPPATH = ['../../common/primitiveResource/include']) -broker_test_env.AppendUnique(CPPPATH = ['../../common/expiryTimer/include']) -broker_test_env.AppendUnique(CPPPATH = ['../../common/expiryTimer/src']) -broker_test_env.AppendUnique(CPPPATH = ['../../common/utils/include']) +broker_test_env.AppendUnique(CPPPATH = [ + '../include', + '../../../include', + '../../common/primitiveResource/include', + '../../common/expiryTimer/include', + '../../common/expiryTimer/src', + '../../common/utils/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) broker_test_env.PrependUnique(CPPPATH = [broker_test_env.get('SRC_DIR')+'/extlibs/hippomocks-master']) broker_test_env.AppendUnique(LIBPATH = [broker_test_env.get('BUILD_DIR')]) diff --git a/service/resource-encapsulation/src/resourceCache/unittests/SConscript b/service/resource-encapsulation/src/resourceCache/unittests/SConscript index 35c674a..88ecfd5 100644 --- a/service/resource-encapsulation/src/resourceCache/unittests/SConscript +++ b/service/resource-encapsulation/src/resourceCache/unittests/SConscript @@ -46,12 +46,18 @@ target_os = cache_test_env.get('TARGET_OS') # Build flags ###################################################################### -cache_test_env.AppendUnique(CPPPATH = ['../include']) -cache_test_env.AppendUnique(CPPPATH = ['../../../include']) -cache_test_env.AppendUnique(CPPPATH = ['../../common/primitiveResource/include']) -cache_test_env.AppendUnique(CPPPATH = ['../../common/expiryTimer/include']) -cache_test_env.AppendUnique(CPPPATH = ['../../common/expiryTimer/src']) -cache_test_env.AppendUnique(CPPPATH = ['../../common/utils/include']) +cache_test_env.AppendUnique(CPPPATH = [ + '../include', + '../../../include', + '../../common/primitiveResource/include', + '../../common/expiryTimer/include', + '../../common/expiryTimer/src', + '../../common/utils/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) cache_test_env.PrependUnique(CPPPATH = [cache_test_env.get('SRC_DIR')+'/extlibs/hippomocks-master']) cache_test_env.AppendUnique(LIBPATH = [cache_test_env.get('BUILD_DIR')]) cache_test_env.PrependUnique(LIBS = ['rcs_client', 'rcs_common', diff --git a/service/resource-encapsulation/src/serverBuilder/SConscript b/service/resource-encapsulation/src/serverBuilder/SConscript index f4b496c..52af1cb 100644 --- a/service/resource-encapsulation/src/serverBuilder/SConscript +++ b/service/resource-encapsulation/src/serverBuilder/SConscript @@ -41,6 +41,10 @@ server_builder_env.AppendUnique(CPPPATH = [ '../common/primitiveResource/include', '../common/utils/include', '../../include', + '#/resource/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/oc_logger/include', ]) server_builder_env.AppendUnique(CPPPATH = [server_builder_env.get('SRC_DIR')+'/extlibs', 'include']) diff --git a/service/resource-encapsulation/unittests/SConscript b/service/resource-encapsulation/unittests/SConscript index 3ea5643..cbfa921 100644 --- a/service/resource-encapsulation/unittests/SConscript +++ b/service/resource-encapsulation/unittests/SConscript @@ -57,9 +57,13 @@ src_dir = lib_env.get('SRC_DIR') ###################################################################### rcs_test_env.AppendUnique( CPPPATH = [ - src_dir + '/extlibs/hippomocks-master', + '#/extlibs/hippomocks-master', '../include', '../src/common/utils/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' ]) rcs_test_env.PrependUnique(LIBS = [ diff --git a/service/scene-manager/SConscript b/service/scene-manager/SConscript index eefada7..6fd6f04 100755 --- a/service/scene-manager/SConscript +++ b/service/scene-manager/SConscript @@ -41,13 +41,18 @@ target_os = env.get('TARGET_OS') ###################################################################### # Build flags ###################################################################### -scenemanager_env.AppendUnique(CPPPATH = ['./include']) -scenemanager_env.AppendUnique(CPPPATH = ['./src']) -scenemanager_env.AppendUnique(CPPPATH = ['../../resource/csdk/connectivity/api']) -scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/include']) -scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/primitiveResource/include']) -scenemanager_env.AppendUnique(CPPPATH = ['../resource-encapsulation/src/common/expiryTimer/include']) - +scenemanager_env.AppendUnique(CPPPATH = [ + './include', + './src', + '#/resource/csdk/connectivity/api', + '../resource-encapsulation/include', + '../resource-encapsulation/src/common/primitiveResource/include', + '../resource-encapsulation/src/common/expiryTimer/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) scenemanager_env.PrependUnique(LIBS = [ 'coap', diff --git a/service/scene-manager/sampleapp/linux/SConscript b/service/scene-manager/sampleapp/linux/SConscript index d483aac..a699565 100644 --- a/service/scene-manager/sampleapp/linux/SConscript +++ b/service/scene-manager/sampleapp/linux/SConscript @@ -12,10 +12,17 @@ rd_mode = lib_env.get('RD_MODE') ###################################################################### # Build flags ###################################################################### -scenemanager_sample_env.AppendUnique(CPPPATH = ['../../include', '../../src']) -scenemanager_sample_env.AppendUnique(CPPPATH = ['../../../resource-encapsulation/include']) -scenemanager_sample_env.AppendUnique(CPPPATH = ['../../../../extlibs/cjson']) -scenemanager_sample_env.AppendUnique(CPPPATH = ['../../../../resource/csdk/connectivity/api']) +scenemanager_sample_env.AppendUnique(CPPPATH = [ + '../../include', + '../../src', + '#/service/resource-encapsulation/include', + '#/extlibs/cjson', + '#/resource/csdk/connectivity/api', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) scenemanager_sample_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x']) scenemanager_sample_env.PrependUnique(LIBS = ['scene_manager']) diff --git a/service/scene-manager/unittests/SConscript b/service/scene-manager/unittests/SConscript index c79227a..6860b4e 100644 --- a/service/scene-manager/unittests/SConscript +++ b/service/scene-manager/unittests/SConscript @@ -60,16 +60,23 @@ if not scene_test_env.get('RELEASE'): scene_test_env.PrependUnique(LIBS = ['gcov']) scene_test_env.AppendUnique(CXXFLAGS = ['--coverage']) -scene_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master']) -scene_test_env.AppendUnique(CPPPATH = ['../include']) -scene_test_env.AppendUnique(CPPPATH = ['../src']) -scene_test_env.AppendUnique(CPPPATH = ['../../resource-encapsulation/include']) -scene_test_env.AppendUnique(CPPPATH = ['../../resource-encapsulation/src/common/primitiveResource/include']) -scene_test_env.AppendUnique(CPPPATH = ['../../resource-encapsulation/src/common/utils/include']) +scene_test_env.PrependUnique(CPPPATH = [ + '#/extlibs/hippomocks-master', + '../include', + '../src', + '#/service/resource-encapsulation/include', + '#/service/resource-encapsulation/src/common/primitiveResource/include', + '#/service/resource-encapsulation/src/common/utils/include', + '#/resource/csdk/security/include', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) if scene_test_env.get('SECURED') == '1': - if scene_test_env.get('WITH_TCP') == True: - scene_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) + if scene_test_env.get('WITH_TCP') == True: + scene_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto']) ###################################################################### # Build Test diff --git a/service/simulator/examples/client/SConscript b/service/simulator/examples/client/SConscript index e5f7676..553fe2a 100644 --- a/service/simulator/examples/client/SConscript +++ b/service/simulator/examples/client/SConscript @@ -6,8 +6,14 @@ sim_env = lib_env.Clone() ###################################################################### # Build flags ###################################################################### -sim_env.AppendUnique(CPPPATH = ['../../../../extlibs/timer']) -sim_env.AppendUnique(CPPPATH = ['../../inc']) +sim_env.AppendUnique(CPPPATH = [ + '#/extlibs/timer', + '../../inc', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) sim_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread']) sim_env.AppendUnique(CPPDEFINES = ['LINUX']) sim_env.AppendUnique(LIBS = ['SimulatorManager']) diff --git a/service/simulator/examples/server/SConscript b/service/simulator/examples/server/SConscript index b5b8a39..ff45cc9 100644 --- a/service/simulator/examples/server/SConscript +++ b/service/simulator/examples/server/SConscript @@ -6,8 +6,14 @@ sim_env = lib_env.Clone() ###################################################################### # Build flags ###################################################################### -sim_env.AppendUnique(CPPPATH = ['../../../../extlibs/timer']) -sim_env.AppendUnique(CPPPATH = ['../../inc']) +sim_env.AppendUnique(CPPPATH = [ + '#/extlibs/timer', + '../../inc', + '#/resource/csdk/include', + '#/resource/csdk/stack/include', + '#/resource/include', + '#/resource/oc_logger/include' +]) sim_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread']) sim_env.AppendUnique(CPPDEFINES = ['LINUX']) sim_env.AppendUnique(LIBS = ['SimulatorManager']) diff --git a/service/third_party_libs.scons b/service/third_party_libs.scons index 3055b2e..eb3aab4 100644 --- a/service/third_party_libs.scons +++ b/service/third_party_libs.scons @@ -47,7 +47,7 @@ if target_os in ['linux']: ******************************************************************************* ''' % target_arch - conf = Configure(lib_env) + conf = Configure(lib_env.Clone(LIBS = [])) if target_os not in ['tizen'] and not conf.CheckLib('boost_thread', language='C++'): print 'Did not find boost_thread, exiting!' @@ -57,7 +57,7 @@ if target_os in ['linux']: print 'Did not find boost_system, exiting!' Exit(1) - lib_env = conf.Finish() + conf.Finish() ###################################################################### # The 'include' path of external libraries -- 2.7.4