Commit cc6ee8f2 authored by Philippe Coval's avatar Philippe Coval Committed by Dan Mihai

build: Use mbedtls in secured mode regardless WITH_TCP

As mbedtls comes now in SECURED mode (even without TCP),
 project is not buildable anymore
 since this change:
https://gerrit.iotivity.org/gerrit/#/c/14883/21/resource/csdk/connectivity/src/SConscript

Ported from 1.2-rel branch to master

Conflicts:
	resource/csdk/stack/samples/linux/OCSample/SConscript
	service/easy-setup/mediator/richsdk/unittests/SConscript
	service/resource-encapsulation/src/common/SConscript
	service/resource-encapsulation/src/serverBuilder/SConscript
	service/scene-manager/unittests/SConscript

Bug: https://jira.iotivity.org/browse/IOT-1622
Change-Id: I202b0e8a9aea6f0675e966ae72325a1ed2cf13f9
Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15809Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Reviewed-by: default avatarNivedita Singhvi <niveditasinghvi@gmail.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16931Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarKevin Kane <kkane@microsoft.com>
Reviewed-by: default avatarZiran Sun <ziran.sun@samsung.com>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
parent 367d7c5b
......@@ -81,8 +81,7 @@ if target_os in ['linux']:
if CoAP_test_env.get('SECURED') == '1':
if CoAP_test_env.get('WITH_TCP') == True:
CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto','tinydtls'])
CoAP_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto','tinydtls'])
######################################################################
# Build Test
######################################################################
......
......@@ -74,8 +74,7 @@ easysetup_test_env.AppendUnique(CPPPATH = [src_dir + '/resource/include',
src_dir + '/service/easy-setup/mediator/richsdk/inc'])
if easysetup_test_env.get('SECURED') == '1':
if easysetup_test_env.get('WITH_TCP') == True:
easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
easysetup_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
######################################################################
# Build Test
......
......@@ -113,8 +113,7 @@ if target_os in ['android','ios','linux','tizen']:
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm'])
if env.get('WITH_TCP') == True:
easy_setup_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
easy_setup_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if not env.get('RELEASE') and target_os not in ['ios']:
easy_setup_env.PrependUnique(LIBS = ['gcov'])
......
......@@ -59,8 +59,7 @@ enrollee_env.PrependUnique(CPPPATH = [
enrollee_env.PrependUnique(LIBS = ['oc', 'octbstack', 'oc_logger', 'ocsrm', 'pthread', 'connectivity_abstraction','coap', 'ESEnrolleeSDK'])
if enrollee_env.get('SECURED') == '1':
enrollee_env.PrependUnique(LIBS = ['ocpmapi', 'ocprovision'])
if enrollee_env.get('WITH_TCP') == True:
enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
enrollee_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
enrollee = enrollee_env.Program('enrollee', ['enrolleewifi.c', 'easysetup_x.c'])
......
......@@ -86,8 +86,8 @@ if 'BROKER' in with_mq:
if env.get('WITH_TCP') == True:
notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
####################################################################
# Source files and Targets
......
......@@ -64,8 +64,8 @@ if env.get('WITH_CLOUD') == True:
if env.get('WITH_TCP') == True:
notification_sample_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if env.get('SECURED') == '1':
notification_sample_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
with_mq = env.get('WITH_MQ')
if 'SUB' in with_mq:
......
......@@ -114,8 +114,7 @@ resource_container_env.AppendUnique(LIBS = ['boost_date_time'])
resource_container_env.AppendUnique(LIBS = ['boost_thread'])
if resource_container_env.get('SECURED') == '1':
if resource_container_env.get('WITH_TCP') == True:
resource_container_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
resource_container_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if int(containerJavaSupport):
try:
......
......@@ -134,8 +134,7 @@ if int(containerJavaSupport):
if container_gtest_env.get('SECURED') == '1':
container_gtest_env.AppendUnique(CPPDEFINES = ['SECURED'])
if container_gtest_env.get('WITH_TCP') == True:
container_gtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
container_gtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
container_gtest_env.AppendUnique(LIBS = ['resource_directory'])
......
......@@ -42,8 +42,7 @@ sample_env.AppendUnique(LIBS = [
sample_env.AppendUnique(CPPPATH = ['../../../include'])
if env.get('SECURED') == '1':
if env.get('WITH_TCP') == True:
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,8 +70,7 @@ if 'g++' in compiler:
broker_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
if broker_test_env.get('SECURED') == '1':
if broker_test_env.get('WITH_TCP') == True:
broker_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
broker_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
######################################################################
# Build Test
......
......@@ -63,8 +63,7 @@ if 'g++' in compiler:
cache_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
if cache_test_env.get('SECURED') == '1':
if cache_test_env.get('WITH_TCP') == True:
cache_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
cache_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
######################################################################
# Build Test
......
......@@ -74,8 +74,7 @@ rcs_test_env.PrependUnique(LIBS = [
if lib_env.get('SECURED') == '1':
rcs_test_env.AppendUnique(CPPDEFINES = ['SECURED'])
if lib_env.get('WITH_TCP') == True:
rcs_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
rcs_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
if 'g++' in rcs_test_env.get('CXX'):
rcs_test_env.AppendUnique(CXXFLAGS = ['-std=c++0x'])
......
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