All the added code for the resource directory shared library dependency on library oc.
https://jira.iotivity.org/browse/IOT-1510
Change-Id: Ic8710588bf0a044e8b29283dc36a411c1928b6ae
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14225
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'sqlite3', 'SConscript'))
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if target_os not in ['linux', 'tizen']:
- SConscript(os.path.join(env.get('SRC_DIR'), 'extlibs', 'sqlite3', 'SConscript'))
+ if target_os not in ['linux', 'tizen']:
+ SConscript('#extlibs/sqlite3/SConscript')
SConscript('#resource/third_party_libs.scons', 'lib_env')
examples_env = lib_env.Clone()
-rd_mode = lib_env.get('RD_MODE')
-
######################################################################
# Build flags
######################################################################
if env.get('WITH_CLOUD'):
examples_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- examples_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Source files and Targets
######################################################################
SConscript('#resource/third_party_libs.scons', 'lib_env')
examples_env = lib_env.Clone()
target_os = examples_env.get('TARGET_OS')
-rd_mode = examples_env.get('RD_MODE')
######################################################################
# Build flags
'../csdk/stack/include',
'../c_common/ocrandom/include',
'../csdk/logger/include',
- '../oc_logger/include'
+ '../oc_logger/include',
])
examples_env.AppendUnique(LIBPATH = [examples_env.get('BUILD_DIR')])
if examples_env.get('LOGGING'):
examples_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- examples_env.AppendUnique(LIBS = ['resource_directory'])
-
def make_single_file_cpp_program(program_name):
return examples_env.Program(program_name, program_name + ".cpp")
target_os = provisiontests_env.get('TARGET_OS')
with_ra = provisiontests_env.get('WITH_RA')
with_ra_ibb = provisiontests_env.get('WITH_RA_IBB')
-rd_mode = provisiontests_env.get('RD_MODE')
######################################################################
# Build flags
if provisiontests_env.get('LOGGING'):
provisiontests_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- provisiontests_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Source files and Targets
######################################################################
src_dir = unittests_env.get('SRC_DIR')
target_os = unittests_env.get('TARGET_OS')
with_mq = unittests_env.get('WITH_MQ')
-rd_mode = unittests_env.get('RD_MODE')
######################################################################
# Build flags
if unittests_env.get('WITH_CLOUD'):
unittests_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- unittests_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Source files and Targets
######################################################################
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
lib_env = env.Clone()
-rd_mode = env.get('RD_MODE')
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
if easysetup_test_env.get('WITH_TCP') == True:
easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if 'CLIENT' in rd_mode:
- easysetup_test_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
- if 'SERVER' in rd_mode:
- easysetup_test_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
- easysetup_test_env.AppendUnique(LIBS = ['resource_directory'])
######################################################################
# Build Test
######################################################################
easysetup_test_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if env.get('SECURED') == '1':
if env.get('WITH_TCP') == True:
easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if 'CLIENT' in rd_mode:
- easysetup_test_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
- if 'SERVER' in rd_mode:
- easysetup_test_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
- easysetup_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
enrollee_env = env.Clone()
transport = enrollee_env.get('TARGET_TRANSPORT')
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if enrollee_env.get('WITH_TCP') == True:
enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- enrollee_env.AppendUnique(LIBS = ['resource_directory'])
-
enrollee = enrollee_env.Program('enrollee', ['enrolleewifi.c', 'easysetup_x.c'])
i_enrollee = enrollee_env.Install(env.get('BUILD_DIR'), enrollee)
mediator_env = env.Clone()
target_os = env.get('TARGET_OS')
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if target_os not in ['windows']:
mediator_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- mediator_env.AppendUnique(LIBS = ['resource_directory'])
-
mediator_env.PrependUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/include',
env.get('SRC_DIR') + '/resource/oc_logger/include',
notification_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])
# notification_env.ParseConfig('pkg-config --cflags --libs sqlite3')
-if 'CLIENT' in notification_env.get('RD_MODE'):
- notification_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
-
if env.get('WITH_CLOUD') == True:
notification_env.AppendUnique(CPPDEFINES = ['WITH_CLOUD'])
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
notification_sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
target_os = env.get('TARGET_OS')
######################################################################
# Build flags
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if 'CLIENT' in rd_mode:
- notification_sample_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
- if 'SERVER' in rd_mode:
- notification_sample_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
- notification_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
####################################################################
# Source files and Targets
######################################################################
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
lib_env = env.Clone()
-rd_mode = env.get('RD_MODE')
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
######################################################################
if env.get('SECURED') == '1':
notification_wrapper_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if 'CLIENT' in rd_mode:
- notification_wrapper_test_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
- if 'SERVER' in rd_mode:
- notification_wrapper_test_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
- notification_wrapper_test_env.AppendUnique(LIBS = ['resource_directory'])
-
if target_os not in ['windows', 'winrt']:
notification_wrapper_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
notification_sample_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
######################################################################
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- notification_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
####################################################################
# Source files and Targets
######################################################################
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
lib_env = env.Clone()
-rd_mode = env.get('RD_MODE')
SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
######################################################################
if env.get('SECURED') == '1':
notification_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- if 'CLIENT' in rd_mode:
- notification_test_env.AppendUnique(CPPDEFINES = ['RD_CLIENT'])
- if 'SERVER' in rd_mode:
- notification_test_env.AppendUnique(CPPDEFINES = ['RD_SERVER'])
- notification_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
resource_container_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
-rd_mode = env.get('RD_MODE')
-
######################################################################
# Build flags
######################################################################
containersample_env.AppendUnique(LIBS = ['rcs_container'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- containersample_env.AppendUnique(LIBS = ['resource_directory'])
-
containersampleapp_src = ['examples/ContainerSample.cpp']
containersampleapp = containersample_env.Program('ContainerSample',containersampleapp_src)
Alias("containersample", containersampleapp)
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
linux_sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if 'rt' in linux_sample_env.get('LIBS'):
linux_sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- linux_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
#build sampleapp
######################################################################
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
linux_sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if 'rt' in linux_sample_env.get('LIBS'):
linux_sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- linux_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
#build sampleapp
######################################################################
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
linux_sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if 'rt' in linux_sample_env.get('LIBS'):
linux_sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- linux_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
#build sampleapp
######################################################################
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
linux_sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
if 'rt' in linux_sample_env.get('LIBS'):
linux_sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- linux_sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
#build sampleapp
######################################################################
SConscript('#service/third_party_libs.scons', 'lib_env')
sample_env = lib_env.Clone()
-rd_mode = lib_env.get('RD_MODE')
sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
sample_env.AppendUnique(LIBS = [
if 'rt' in sample_env.get('LIBS'):
sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# ##### Client #####
######################################################################
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
sample_env = lib_env.Clone()
-rd_mode = env.get('RD_MODE')
sample_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x'])
sample_env.AppendUnique(LIBS = [
if 'rt' in sample_env.get('LIBS'):
sample_env.Append(LIBS = ['rt'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- sample_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# ##### Authorized Client #####
######################################################################
target_os = rcs_common_env.get('TARGET_OS')
release = rcs_common_env.get('RELEASE')
src_dir = rcs_common_env.get('SRC_DIR')
-rd_mode = rcs_common_env.get('RD_MODE')
######################################################################
# Build flags
if rcs_common_env.get('WITH_TCP') == True:
rcs_common_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- rcs_common_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Source files and Targets
######################################################################
# SConscript file for Local PKI google tests
gtest_env = SConscript('#extlibs/gtest/SConscript')
lib_env = gtest_env.Clone()
-rd_mode = lib_env.get('RD_MODE')
if lib_env.get('RELEASE'):
lib_env.AppendUnique(CCFLAGS = ['-Os'])
if broker_test_env.get('WITH_TCP') == True:
broker_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- broker_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
# SConscript file for Local PKI google tests
gtest_env = SConscript('#extlibs/gtest/SConscript')
lib_env = gtest_env.Clone()
-rd_mode = lib_env.get('RD_MODE')
if lib_env.get('RELEASE'):
lib_env.AppendUnique(CCFLAGS = ['-Os'])
if cache_test_env.get('WITH_TCP') == True:
cache_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- cache_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
gtest_env = SConscript('#extlibs/gtest/SConscript')
lib_env = gtest_env.Clone()
target_os = lib_env.get('TARGET_OS')
-rd_mode = lib_env.get('RD_MODE')
if lib_env.get('RELEASE'):
lib_env.AppendUnique(CCFLAGS = ['-Os'])
if lib_env.get('WITH_TCP') == True:
rcs_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- rcs_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
hosting_test_env = lib_env.Clone()
target_os = hosting_test_env.get('TARGET_OS')
-rd_mode = lib_env.get('RD_MODE')
######################################################################
# Build flags
if hosting_test_env.get('WITH_TCP') == True:
hosting_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- hosting_test_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
# SConscript file for Local PKI google tests
gtest_env = SConscript('#extlibs/gtest/SConscript')
lib_env = gtest_env.Clone()
-rd_mode = lib_env.get('RD_MODE')
if lib_env.get('RELEASE'):
lib_env.AppendUnique(CCFLAGS = ['-Os'])
scene_test_env = lib_env.Clone()
target_os = scene_test_env.get('TARGET_OS')
-rd_mode = scene_test_env.get('RD_MODE')
######################################################################
# Build flags
if scene_test_env.get('WITH_TCP') == True:
scene_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- scene_test_env.PrependUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################
gtest_env = SConscript('#extlibs/gtest/SConscript')
lib_env = gtest_env.Clone()
target_os = lib_env.get('TARGET_OS')
-rd_mode = lib_env.get('RD_MODE')
if lib_env.get('RELEASE'):
lib_env.AppendUnique(CCFLAGS = ['-Os'])
if ThingsManager_gtest_env.get('WITH_TCP') == True:
ThingsManager_gtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- ThingsManager_gtest_env.AppendUnique(LIBS = ['resource_directory'])
-
######################################################################
# Build Test
######################################################################