Commit 8c6fd1e0 authored by Ziran Sun's avatar Ziran Sun

Linking against version of libcoap in favor of the version in extlibs.

Bug: https://jira.iotivity.org/browse/IOT-2055
Change-Id: I3ca9b87ab33aeeb18607c582f2bdccfaa18b3d2f
Signed-off-by: default avatarZiran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19063Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarPhil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: default avatarDave Thaler <dthaler@microsoft.com>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
parent b4d04492
...@@ -31,10 +31,13 @@ cc_sample_app_env = lib_env.Clone() ...@@ -31,10 +31,13 @@ cc_sample_app_env = lib_env.Clone()
###################################################################### ######################################################################
# Build flags # Build flags
###################################################################### ######################################################################
# For bring up purposes only, the forked version will live here. with_upstream_libcoap = cc_sample_app_env.get('WITH_UPSTREAM_LIBCOAP')
cc_sample_app_env.AppendUnique(CPPPATH = ['#/resource/csdk/connectivity/lib/libcoap-4.1.1/include', if with_upstream_libcoap == '1':
'#/extlibs/mbedtls/mbedtls/include']) cc_sample_app_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else:
cc_sample_app_env.AppendUnique(CPPPATH = [
'#resource/csdk/connectivity/lib/libcoap-4.1.1/include'
])
cc_sample_app_env.AppendUnique(CPPPATH = [ cc_sample_app_env.AppendUnique(CPPPATH = [
'#/resource/include/', '#/resource/include/',
...@@ -49,7 +52,8 @@ cc_sample_app_env.AppendUnique(CPPPATH = [ ...@@ -49,7 +52,8 @@ cc_sample_app_env.AppendUnique(CPPPATH = [
'#/resource/csdk/connectivity/common/inc', '#/resource/csdk/connectivity/common/inc',
'#/resource/csdk/security/include', '#/resource/csdk/security/include',
'#/resource/csdk/security/provisioning/include', '#/resource/csdk/security/provisioning/include',
'#/resource/csdk/security/provisioning/include/internal' '#/resource/csdk/security/provisioning/include/internal',
'#/extlibs/mbedtls/mbedtls/include'
]) ])
cc_sample_app_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x', '-pthread']) cc_sample_app_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x', '-pthread'])
......
...@@ -31,6 +31,14 @@ jni_env = lib_env.Clone() ...@@ -31,6 +31,14 @@ jni_env = lib_env.Clone()
###################################################################### ######################################################################
# Build flags # Build flags
###################################################################### ######################################################################
with_upstream_libcoap = jni_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1':
jni_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else:
jni_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
])
jni_env.AppendUnique(CPPPATH = [ jni_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/csdk/connectivity/api', env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
env.get('SRC_DIR') + '/resource/include', env.get('SRC_DIR') + '/resource/include',
...@@ -49,8 +57,7 @@ jni_env.AppendUnique(CPPPATH = [ ...@@ -49,8 +57,7 @@ jni_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud/', env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/cloud/',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm', env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/oxm',
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal', env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include/internal',
env.get('SRC_DIR') + '/resource/csdk/security/include', env.get('SRC_DIR') + '/resource/csdk/security/include'
env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
]) ])
target_os = env.get('TARGET_OS') target_os = env.get('TARGET_OS')
......
...@@ -36,10 +36,8 @@ print"Reading PI script" ...@@ -36,10 +36,8 @@ print"Reading PI script"
###################################################################### ######################################################################
with_unforked_libcoap = env.get('WITH_UNFORKED_LIBCOAP') with_unforked_libcoap = env.get('WITH_UNFORKED_LIBCOAP')
if with_unforked_libcoap == '1': if with_unforked_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
env.PrependUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')]) env.PrependUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')])
env.PrependUnique(CPPPATH = [ os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'), env.PrependUnique(CPPPATH = [ os.path.join(src_dir, 'resource', 'c_common', 'oic_malloc', 'include'),
......
...@@ -29,6 +29,12 @@ rd_mode = ipca_lib_env.get('RD_MODE') ...@@ -29,6 +29,12 @@ rd_mode = ipca_lib_env.get('RD_MODE')
###################################################################### ######################################################################
# Build flags # Build flags
###################################################################### ######################################################################
with_upstream_libcoap = ipca_lib_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1':
ipca_lib_env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else:
ipca_lib_env.PrependUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
ipca_lib_env.PrependUnique(CPPPATH = [ ipca_lib_env.PrependUnique(CPPPATH = [
'../inc', '../inc',
'inc', 'inc',
...@@ -41,7 +47,6 @@ ipca_lib_env.PrependUnique(CPPPATH = [ ...@@ -41,7 +47,6 @@ ipca_lib_env.PrependUnique(CPPPATH = [
'#/resource/csdk/security/provisioning/include/internal', '#/resource/csdk/security/provisioning/include/internal',
'#/resource/csdk/connectivity/api', '#/resource/csdk/connectivity/api',
'#/resource/csdk/connectivity/external/inc', '#/resource/csdk/connectivity/external/inc',
'#/resource/csdk/connectivity/lib/libcoap-4.1.1/include',
'#/resource/csdk/ocsocket/include', '#/resource/csdk/ocsocket/include',
'#/resource/csdk/logger/include', '#/resource/csdk/logger/include',
'#/resource/c_common/ocrandom/include', '#/resource/c_common/ocrandom/include',
......
...@@ -26,10 +26,8 @@ connectivity_env.PrependUnique(CPPPATH = [ os.path.join(root_dir, 'api') ]) ...@@ -26,10 +26,8 @@ connectivity_env.PrependUnique(CPPPATH = [ os.path.join(root_dir, 'api') ])
with_upstream_libcoap = connectivity_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = connectivity_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
connectivity_env.AppendUnique(CPPPATH = [os.path.join('#extlibs', 'libcoap', 'libcoap', 'include')]) connectivity_env.AppendUnique(CPPPATH = [os.path.join('#extlibs', 'libcoap', 'libcoap', 'include')])
else: else:
# For bring up purposes only, the forked version will live here.
connectivity_env.AppendUnique(CPPPATH = [ os.path.join('#resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')]) connectivity_env.AppendUnique(CPPPATH = [ os.path.join('#resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')])
connectivity_env.AppendUnique(CPPPATH = [ os.path.join(root_dir, 'inc'), connectivity_env.AppendUnique(CPPPATH = [ os.path.join(root_dir, 'inc'),
......
...@@ -34,10 +34,8 @@ rd_mode = catest_env.get('RD_MODE') ...@@ -34,10 +34,8 @@ rd_mode = catest_env.get('RD_MODE')
# Build flags # Build flags
###################################################################### ######################################################################
if catest_env.get('WITH_UPSTREAM_LIBCOAP') == '1': if catest_env.get('WITH_UPSTREAM_LIBCOAP') == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
catest_env.AppendUnique(CPPPATH = [os.path.join('#', 'extlibs', 'libcoap', 'libcoap', 'include')]) catest_env.AppendUnique(CPPPATH = [os.path.join('#', 'extlibs', 'libcoap', 'libcoap', 'include')])
else: else:
# For bring up purposes only, the forked version will live here.
catest_env.AppendUnique(CPPPATH = [ os.path.join('#', 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')]) catest_env.AppendUnique(CPPPATH = [ os.path.join('#', 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1', 'include')])
catest_env.PrependUnique(CPPPATH = [ catest_env.PrependUnique(CPPPATH = [
......
...@@ -53,13 +53,20 @@ src_dir = lib_env.get('SRC_DIR') ...@@ -53,13 +53,20 @@ src_dir = lib_env.get('SRC_DIR')
###################################################################### ######################################################################
# Build flags # Build flags
###################################################################### ######################################################################
with_upstream_libcoap = rd_test_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1':
rd_test_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else:
rd_test_env.AppendUnique(CPPPATH = [
src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'
])
rd_test_env.AppendUnique( rd_test_env.AppendUnique(
CPPPATH = [ CPPPATH = [
src_dir + '/extlibs/hippomocks/hippomocks', src_dir + '/extlibs/hippomocks/hippomocks',
'../include', '../include',
src_dir + '/resource/include', src_dir + '/resource/include',
src_dir + '/resource/csdk/connectivity/api', src_dir + '/resource/csdk/connectivity/api',
src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include',
src_dir + '/resource/csdk/include', src_dir + '/resource/csdk/include',
src_dir + '/resource/csdk/stack/include', src_dir + '/resource/csdk/stack/include',
src_dir + '/resource/csdk/security/include', src_dir + '/resource/csdk/security/include',
......
...@@ -33,10 +33,8 @@ target_os = libocsrm_env.get('TARGET_OS') ...@@ -33,10 +33,8 @@ target_os = libocsrm_env.get('TARGET_OS')
###################################################################### ######################################################################
with_upstream_libcoap = libocsrm_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = libocsrm_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
libocsrm_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) libocsrm_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
libocsrm_env.AppendUnique(CPPPATH = ['#/resource/csdk/connectivity/lib/libcoap-4.1.1/include']) libocsrm_env.AppendUnique(CPPPATH = ['#/resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
libocsrm_env.PrependUnique(CPPPATH = [ libocsrm_env.PrependUnique(CPPPATH = [
......
...@@ -35,10 +35,8 @@ rd_mode = sptest_env.get('RD_MODE') ...@@ -35,10 +35,8 @@ rd_mode = sptest_env.get('RD_MODE')
###################################################################### ######################################################################
with_upstream_libcoap = sptest_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = sptest_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
sptest_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) sptest_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
sptest_env.AppendUnique(CPPPATH = ['../../../connectivity/lib/libcoap-4.1.1/include']) sptest_env.AppendUnique(CPPPATH = ['../../../connectivity/lib/libcoap-4.1.1/include'])
sptest_env.PrependUnique(CPPPATH = [ sptest_env.PrependUnique(CPPPATH = [
......
...@@ -30,10 +30,8 @@ target_os = tools_env.get('TARGET_OS') ...@@ -30,10 +30,8 @@ target_os = tools_env.get('TARGET_OS')
###################################################################### ######################################################################
with_upstream_libcoap = tools_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = tools_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
tools_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) tools_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
tools_env.AppendUnique(CPPPATH = ['../../connectivity/lib/libcoap-4.1.1/include']) tools_env.AppendUnique(CPPPATH = ['../../connectivity/lib/libcoap-4.1.1/include'])
tools_env.PrependUnique(CPPPATH = ['#/extlibs/cjson', tools_env.PrependUnique(CPPPATH = ['#/extlibs/cjson',
......
...@@ -35,10 +35,8 @@ rd_mode = srmtest_env.get('RD_MODE') ...@@ -35,10 +35,8 @@ rd_mode = srmtest_env.get('RD_MODE')
###################################################################### ######################################################################
with_upstream_libcoap = srmtest_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = srmtest_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
srmtest_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) srmtest_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
srmtest_env.AppendUnique(CPPPATH = ['../../connectivity/lib/libcoap-4.1.1/include']) srmtest_env.AppendUnique(CPPPATH = ['../../connectivity/lib/libcoap-4.1.1/include'])
srmtest_env.PrependUnique(CPPPATH = [ srmtest_env.PrependUnique(CPPPATH = [
......
...@@ -49,10 +49,8 @@ if target_os == 'arduino': ...@@ -49,10 +49,8 @@ if target_os == 'arduino':
###################################################################### ######################################################################
with_upstream_libcoap = liboctbstack_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = liboctbstack_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
liboctbstack_env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) liboctbstack_env.PrependUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
liboctbstack_env.PrependUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include']) liboctbstack_env.PrependUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
liboctbstack_env.PrependUnique(CPPPATH = [ liboctbstack_env.PrependUnique(CPPPATH = [
......
...@@ -20,10 +20,8 @@ with_mq = env.get('WITH_MQ') ...@@ -20,10 +20,8 @@ with_mq = env.get('WITH_MQ')
with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
env.AppendUnique(CPPPATH = ['../../../../connectivity/lib/libcoap-4.1.1']) env.AppendUnique(CPPPATH = ['../../../../connectivity/lib/libcoap-4.1.1'])
env.PrependUnique(CPPPATH = [ env.PrependUnique(CPPPATH = [
......
...@@ -30,10 +30,8 @@ ocprovision_env = lib_env.Clone() ...@@ -30,10 +30,8 @@ ocprovision_env = lib_env.Clone()
###################################################################### ######################################################################
with_upstream_libcoap = ocprovision_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = ocprovision_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
ocprovision_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) ocprovision_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
ocprovision_env.AppendUnique(CPPPATH = ['../csdk/connectivity/lib/libcoap-4.1.1/include']) ocprovision_env.AppendUnique(CPPPATH = ['../csdk/connectivity/lib/libcoap-4.1.1/include'])
ocprovision_env.AppendUnique(CPPPATH = [ ocprovision_env.AppendUnique(CPPPATH = [
......
...@@ -41,10 +41,8 @@ with_mq = oclib_env.get('WITH_MQ') ...@@ -41,10 +41,8 @@ with_mq = oclib_env.get('WITH_MQ')
###################################################################### ######################################################################
with_upstream_libcoap = oclib_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = oclib_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
oclib_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) oclib_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
oclib_env.AppendUnique(CPPPATH = ['../csdk/connectivity/lib/libcoap-4.1.1/include']) oclib_env.AppendUnique(CPPPATH = ['../csdk/connectivity/lib/libcoap-4.1.1/include'])
oclib_env.AppendUnique(CPPPATH = [ oclib_env.AppendUnique(CPPPATH = [
......
...@@ -50,8 +50,6 @@ local_env.AppendUnique(CPPPATH = ['include', ...@@ -50,8 +50,6 @@ local_env.AppendUnique(CPPPATH = ['include',
with_upstream_libcoap = local_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = local_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only,
# we manually copy the forked version to where the unforked version is downloaded.
local_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) local_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
local_env.AppendUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include']) local_env.AppendUnique(CPPPATH = ['#resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
......
...@@ -109,10 +109,8 @@ if target_os in ['android','ios','linux','tizen']: ...@@ -109,10 +109,8 @@ if target_os in ['android','ios','linux','tizen']:
if env.get('SECURED') == '1': if env.get('SECURED') == '1':
with_upstream_libcoap = easy_setup_env.get('WITH_UPSTREAM_LIBCOAP') with_upstream_libcoap = easy_setup_env.get('WITH_UPSTREAM_LIBCOAP')
if with_upstream_libcoap == '1': if with_upstream_libcoap == '1':
# For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
easy_setup_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include']) easy_setup_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
else: else:
# For bring up purposes only, the forked version will live here.
easy_setup_env.AppendUnique(CPPPATH = [env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include']) easy_setup_env.AppendUnique(CPPPATH = [env.get('SRC_DIR') + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include'])
easy_setup_env.AppendUnique(CPPPATH = [ easy_setup_env.AppendUnique(CPPPATH = [
env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include', env.get('SRC_DIR') + '/resource/csdk/security/provisioning/include',
......
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