Commit 68b77bca authored by Habib Virji's avatar Habib Virji Committed by Ziran Sun

Remove shared resource directory library usage from other modules

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: default avatarHabib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14225Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: default avatarZiran Sun <ziran.sun@samsung.com>
parent 48114bc3
......@@ -145,5 +145,5 @@ if env.get('SECURED') == '1' and target_os not in ['linux', 'tizen']:
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')
......@@ -27,8 +27,6 @@ lib_env = env.Clone()
SConscript('#resource/third_party_libs.scons', 'lib_env')
examples_env = lib_env.Clone()
rd_mode = lib_env.get('RD_MODE')
######################################################################
# Build flags
######################################################################
......@@ -73,9 +71,6 @@ if target_os in ['darwin', 'ios']:
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
######################################################################
......
......@@ -28,7 +28,6 @@ lib_env = thread_env.Clone()
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
......@@ -38,7 +37,7 @@ examples_env.AppendUnique(CPPPATH = [
'../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')])
......@@ -81,9 +80,6 @@ if target_os in ['msys_nt', 'windows']:
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")
......
......@@ -28,7 +28,6 @@ src_dir = provisiontests_env.get('SRC_DIR')
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
......@@ -82,9 +81,6 @@ if provisiontests_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -27,7 +27,6 @@ unittests_env = gtest_env.Clone()
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
......@@ -73,9 +72,6 @@ if unittests_env.get('LOGGING'):
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
######################################################################
......
......@@ -34,7 +34,6 @@ if env.get('LOGGING'):
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')
......@@ -76,12 +75,6 @@ if easysetup_test_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -44,7 +44,6 @@ gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'
easysetup_test_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
......@@ -74,14 +73,6 @@ easysetup_test_env.AppendUnique(CPPPATH = [ src_dir + '/resource/include',
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
######################################################################
......
......@@ -28,7 +28,6 @@ print Dir('.').abspath
enrollee_env = env.Clone()
transport = enrollee_env.get('TARGET_TRANSPORT')
rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
......@@ -62,9 +61,6 @@ if enrollee_env.get('SECURED') == '1':
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)
......
......@@ -23,7 +23,6 @@ Import('env')
mediator_env = env.Clone()
target_os = env.get('TARGET_OS')
rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
......@@ -44,9 +43,6 @@ env.AppendUnique(CPPDEFINES = ['CPP_MEDIATOR'])
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',
......
......@@ -81,9 +81,6 @@ if target_os == 'tizen':
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'])
......
......@@ -28,7 +28,6 @@ lib_env = env.Clone()
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
......@@ -75,13 +74,6 @@ if env.get('WITH_TCP') == True:
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
######################################################################
......
......@@ -34,7 +34,6 @@ if env.get('LOGGING'):
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')
######################################################################
......@@ -62,13 +61,6 @@ if env.get('WITH_TCP') == True:
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'])
......
......@@ -9,7 +9,6 @@ SConscript(env.get('SRC_DIR') + '/service/third_party_libs.scons', 'lib_env')
notification_sample_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
######################################################################
......@@ -66,9 +65,6 @@ if env.get('WITH_TCP') == True:
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
######################################################################
......
......@@ -34,7 +34,6 @@ if env.get('LOGGING'):
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')
######################################################################
......@@ -73,13 +72,6 @@ if env.get('WITH_TCP') == True:
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
######################################################################
......
......@@ -41,8 +41,6 @@ SConscript('#service/third_party_libs.scons', exports = 'lib_env')
resource_container_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
rd_mode = env.get('RD_MODE')
######################################################################
# Build flags
######################################################################
......@@ -239,9 +237,6 @@ Ignore("examples/ResourceContainerConfig.xml", "examples/ResourceContainerConfig
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)
......
......@@ -8,7 +8,6 @@ Import('env')
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
......@@ -32,9 +31,6 @@ if env.get('SECURED') == '1':
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
######################################################################
......
......@@ -8,7 +8,6 @@ Import('env')
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
......@@ -32,9 +31,6 @@ if env.get('SECURED') == '1':
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
######################################################################
......
......@@ -8,7 +8,6 @@ Import('env')
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
......@@ -32,9 +31,6 @@ if env.get('SECURED') == '1':
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
######################################################################
......
......@@ -8,7 +8,6 @@ Import('env')
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
......@@ -32,9 +31,6 @@ if env.get('SECURED') == '1':
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
######################################################################
......
......@@ -28,7 +28,6 @@ lib_env = env.Clone()
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 = [
......@@ -48,9 +47,6 @@ if env.get('SECURED') == '1':
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 #####
######################################################################
......
......@@ -27,7 +27,6 @@ Import('env')
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 = [
......@@ -49,9 +48,6 @@ if env.get('SECURED') == '1':
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 #####
######################################################################
......
......@@ -33,7 +33,6 @@ rcs_common_env = lib_env.Clone()
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
......@@ -70,9 +69,6 @@ if rcs_common_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -24,7 +24,6 @@
# 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'])
......@@ -74,9 +73,6 @@ if broker_test_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -24,7 +24,6 @@
# 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'])
......@@ -67,9 +66,6 @@ if cache_test_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -25,7 +25,6 @@
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'])
......@@ -75,9 +74,6 @@ if lib_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -44,7 +44,6 @@ src_dir = lib_env.get('SRC_DIR')
hosting_test_env = lib_env.Clone()
target_os = hosting_test_env.get('TARGET_OS')
rd_mode = lib_env.get('RD_MODE')
######################################################################
# Build flags
......@@ -68,9 +67,6 @@ if hosting_test_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -24,7 +24,6 @@
# 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'])
......@@ -44,7 +43,6 @@ src_dir = lib_env.get('SRC_DIR')
scene_test_env = lib_env.Clone()
target_os = scene_test_env.get('TARGET_OS')
rd_mode = scene_test_env.get('RD_MODE')
######################################################################
# Build flags
......@@ -73,9 +71,6 @@ if scene_test_env.get('SECURED') == '1':
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
######################################################################
......
......@@ -27,7 +27,6 @@ import os
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'])
......@@ -76,9 +75,6 @@ if ThingsManager_gtest_env.get('SECURED') == '1':
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
######################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment