Commit a262764e authored by Pawel Winogrodzki's avatar Pawel Winogrodzki Committed by Mike Fenelon

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: default avatarPawel Winogrodzki <pawelwi@microsoft.com>
Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17641Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Reviewed-by: default avatarMike Fenelon <mike.fenelon@microsoft.com>
parent 4c1e2be6
......@@ -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
......
......@@ -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 = '''
/* ****************************************************************************
......
......@@ -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 = '''
/* ****************************************************************************
......
......@@ -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')
......@@ -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'])
......
......@@ -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'])
......
......@@ -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
######################################################################
......
......@@ -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',
......
......@@ -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
......
......@@ -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')
......@@ -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
......
......@@ -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'
......
......@@ -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
......
......@@ -22,6 +22,15 @@ Import('env')
target_os = env.get('TARGET_OS')