iotivity.pc
# Ignore downloaded dependencies
+extlibs/libcoap/libcoap
extlibs/gtest/gtest-*
extlibs/hippomocks-master/
extlibs/master.zip
# Get the device name. This name can be used as network display name wherever possible
device_name = ARGUMENTS.get('DEVICE_NAME', "OIC-DEVICE")
+default_with_upstream_libcoap = 0
+
if ARGUMENTS.get('TEST'):
logging_default = False
else:
help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK path', None, PathVariable.PathAccept))
help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept))
help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile))
+help_vars.Add(EnumVariable('WITH_UPSTREAM_LIBCOAP', 'Use latest stable version of LibCoAP downloaded from github', default_with_upstream_libcoap, allowed_values=('0','1')))
AddOption('--prefix',
dest='prefix',
--- /dev/null
+################################################################################
+#
+# Copyright 2016 Intel Corporation
+#
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+################################################################################
+
+##
+# 'libcoap' script to check if LibCoAP library is installed. If not,
+# get it and install it
+#
+##
+
+import os
+import glob
+
+Import('env')
+
+libcoap_env = env.Clone()
+target_os = libcoap_env.get('TARGET_OS')
+src_dir = libcoap_env.get('SRC_DIR')
+ca_transport = libcoap_env.get('TARGET_TRANSPORT')
+with_tcp = libcoap_env.get('WITH_TCP')
+with_upstream_libcoap = libcoap_env.get('WITH_UPSTREAM_LIBCOAP')
+
+######################################################################
+# Download libCoAP
+######################################################################
+libcoap_branch = 'develop'
+libcoap_dir = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap')
+libcoap_zip_file = os.path.join(src_dir, 'extlibs', 'libcoap', libcoap_branch + '.zip')
+libcoap_repo_url = 'https://github.com/obgm/libcoap'
+libcoap_url = libcoap_repo_url + '/archive/' + libcoap_branch + '.zip'
+libcoap_checkout_command = 'git clone ' + libcoap_repo_url + '.git extlibs/libcoap/libcoap --branch ' + libcoap_branch
+
+if with_upstream_libcoap == '1':
+ print '*** Checking for installation of libCoAP ***'
+ if not os.path.exists(libcoap_dir):
+ # If the libcoap zip file is not already present, download it
+ if not os.path.exists(libcoap_zip_file):
+ libcoap_zip = libcoap_env.Download(libcoap_zip_file, libcoap_url)
+ else:
+ libcoap_zip = libcoap_zip_file
+ # Unzip libcoap
+ if libcoap_zip and not os.path.exists(os.path.join(libcoap_dir, 'configure')):
+ print 'Unzipping libCoAP'
+ env.UnpackAll(libcoap_dir, libcoap_zip)
+ # Rename libcoap
+ libcoap_unzip_dir = os.path.join(src_dir, 'extlibs', 'libcoap', 'libcoap-' + libcoap_branch)
+ if os.path.exists(os.path.join(libcoap_unzip_dir)):
+ os.rename(libcoap_unzip_dir, libcoap_dir)
+ if not os.path.exists(os.path.join(libcoap_dir, 'README')):
+ print '''
+*********************************** Error: ****************************************
+* Unable to download and unpack libcoap! *
+* Please download libcoap using the following command: *
+* *
+''' + libcoap_checkout_command + '''
+* *
+***********************************************************************************'''
+ Exit()
+else:
+ print '''
+*********************************** Info: *****************************************
+* Using FORKED copy of libCoap located in: *
+* resource/csdk/connectivity/lib/libcoap-4.1.1 *
+***********************************************************************************'''
+
+######################################################################
+# Build libCoAP
+######################################################################
+# As in the source code(C) includes arduino Time library head file(C++)
+# It requires compile the .c with g++
+if target_os == 'arduino':
+ libcoap_env.Replace(CFLAGS = libcoap_env.get('CXXFLAGS'))
+ libcoap_env.PrependUnique(CPPPATH = [
+ './',
+ env.get('ARDUINO_HOME') + '/',
+ env.get('ARDUINO_HOME') + '/hardware/arduino/avr/cores/arduino',
+ env.get('ARDUINO_HOME') + '/hardware/tools/avr/avr/include/',
+ env.get('ARDUINO_HOME') + '/hardware/arduino/avr/variants/mega',
+ env.get('ARDUINO_HOME') + '/libraries/Time/Time',
+ env.get('ARDUINO_HOME') + '/libraries/TimedAction',
+ env.get('ARDUINO_HOME') + '/hardware/arduino/avr/libraries/SPI',
+ env.get('ARDUINO_HOME') + '/libraries/Ethernet/src/utility',
+ ])
+
+# Build flags
+if target_os not in ['arduino', 'windows', 'winrt', 'msys_nt']:
+ libcoap_env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '_DEFAULT_SOURCE'])
+ libcoap_env.AppendUnique(CFLAGS = ['-std=gnu99','-fPIC'])
+
+if target_os not in ['windows', 'winrt']:
+ libcoap_env.AppendUnique(CFLAGS = ['-Wall', '-ffunction-sections',
+ '-fdata-sections', '-fno-exceptions'])
+
+if target_os == 'msys_nt':
+ libcoap_env.AppendUnique(CPPDEFINES = ['_DEFAULT_SOURCE'])
+ libcoap_env.AppendUnique(CFLAGS = ['-std=c99'])
+
+if target_os in ['linux', 'tizen', 'android', 'ios', 'arduino']:
+ if with_tcp == True:
+ libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
+
+if target_os in ['linux', 'tizen', 'android', 'arduino']:
+ libcoap_env.AppendUnique(LIBS = ['log'])
+ if (('BLE' in ca_transport) or ('BT' in ca_transport) or ('ALL' in ca_transport)):
+ libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
+
+if target_os == 'arduino':
+ libcoap_env.AppendUnique(CPPDEFINES = ['NDEBUG', 'WITH_ARDUINO'])
+
+if target_os in ['darwin', 'ios']:
+ libcoap_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
+
+if env.get('LOGGING') == '1':
+ libcoap_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+
+######################################################################
+# Source files and Target(s)
+######################################################################
+with_upstream_libcoap = libcoap_env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+ libcoap_env.AppendUnique(CPPDEFINES = ['WITH_UPSTREAM_LIBCOAP'])
+ libcoap_src_root = os.path.join(libcoap_dir, 'src')
+
+ # We need to generate coap.h from coap.h.in
+ coap_h_pc_file = os.path.join(libcoap_dir, 'include', 'coap', 'coap.h.in')
+ coap_h_output = os.path.join(libcoap_dir, 'include', 'coap', 'coap.h')
+
+ libcoap_version = libcoap_branch
+ lib_prefix = '' + str(libcoap_env.get('PREFIX'))
+ pc_vars = {
+ '\@LIBCOAP_PACKAGE_NAME\@' : lib_prefix + 'coap',
+ '\@LIBCOAP_PACKAGE_STRING\@' : lib_prefix + 'coap-' + libcoap_version,
+ '\@LIBCOAP_PACKAGE_URL\@' : libcoap_repo_url,
+ '\@LIBCOAP_PACKAGE_BUGREPORT\@' : libcoap_repo_url + '/issues',
+ '\@LIBCOAP_PACKAGE_VERSION\@' : libcoap_version
+ }
+ libcoap_env.Substfile(coap_h_pc_file, SUBST_DICT = pc_vars)
+else:
+ # For bring up purposes only, the forked version will live here.
+ libcoap_src_root = src_dir + '/resource/csdk/connectivity/lib/libcoap-4.1.1'
+
+libcoap_src = glob.glob(os.path.join(libcoap_src_root, '*.c'))
+libcoap = libcoap_env.StaticLibrary('coap', libcoap_src, OBJPREFIX='libcoap_')
+
+libcoap_env.InstallTarget([libcoap], 'coap')
+
cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
cp -R ./extlibs/timer $sourcedir/tmp/extlibs
cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
+cp -R ./extlibs/libcoap $sourcedir/tmp/extlibs
cp -R ./resource $sourcedir/tmp
cp -R ./service $sourcedir/tmp
cp ./extra_options.scons $sourcedir/tmp
######################################################################
# Build flags
######################################################################
+with_unforked_libcoap = env.get('WITH_UNFORKED_LIBCOAP')
+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'])
+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', 'c_common', 'oic_malloc', 'include'),
os.path.join(src_dir, 'resource', 'c_common', 'oic_string', 'include'),
os.path.join(src_dir, 'resource', 'c_common', 'oic_time', 'include'),
os.path.join(src_dir, 'resource', 'oc_logger', 'include'),
os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
- os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include'),
- os.path.join(src_dir, 'resource', 'csdk', 'connectivity', 'lib', 'libcoap-4.1.1')
+ os.path.join(src_dir, 'resource', 'csdk', 'stack', 'include')
])
env.AppendUnique(CPPPATH = [ os.path.join(pi_path, 'include'),
os.path.join(pi_path, 'include', 'internal'),
#include <string.h>
#include "zigbee_wrapper.h"
-#include "utlist.h"
+#include <coap/utlist.h>
#include "oic_malloc.h"
#include "oic_string.h"
#include "ocstack.h"
#include "plugintypes.h"
#include "telegesis_socket.h"
-#include "utlist.h"
+
+#include <coap/utlist.h>
// TODO: Use OICThread instead of pthread directly.
// TODO: Use OICMutex instead of mutex directly.
if target_os not in ['arduino', 'darwin', 'ios', 'android', 'msys_nt', 'windows']:
env.AppendUnique(LIBS=['rt'])
-# Build libcoap
-SConscript('csdk/connectivity/lib/libcoap-4.1.1/SConscript')
+# Download (if not already present) & build libcoap
+SConscript('#extlibs/libcoap/SConscript')
# Build C Common dependencies
SConscript('c_common/SConscript')
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = liboctbstack_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ liboctbstack_env.PrependUnique(CPPPATH = ['connectivity/lib/libcoap-4.1.1/include'])
+
liboctbstack_env.PrependUnique(CPPPATH = [
'../../extlibs/cjson/',
'../../extlibs/timer/',
'stack/include',
'stack/include/internal',
'../oc_logger/include',
- 'connectivity/lib/libcoap-4.1.1',
'connectivity/common/inc',
'connectivity/inc',
'connectivity/inc/pkix',
rm -rf ./tmp
mkdir ./tmp
mkdir ./tmp/con/
+mkdir -p $sourcedir/tmp/con/extlibs/
+
cp -R $cur_dir/* $sourcedir/tmp/con
cp -R $cur_dir/SConscript $sourcedir/tmp/con
cp -R $cur_dir/src/ip_adapter/SConscript $sourcedir/tmp/con/src/ip_adapter/
cp -R $cur_dir/src/bt_le_adapter/SConscript $sourcedir/tmp/con/src/bt_le_adapter/
cp -R $cur_dir/src/bt_edr_adapter/SConscript $sourcedir/tmp/con/src/bt_edr_adapter/
cp -R $cur_dir/common/SConscript $sourcedir/tmp/con/common/
-cp -R $cur_dir/lib/libcoap-4.1.1/SConscript $sourcedir/tmp/con/lib/libcoap-4.1.1/
cp -R $cur_dir/samples/tizen/ $sourcedir/tmp/con/sample/
mkdir -p $sourcedir/tmp/con/sample/external/inc
cp -R $cur_dir/external/inc/* $sourcedir/tmp/con/sample/external/inc/
-mkdir -p $sourcedir/tmp/con/extlibs/
+
cp -R ./extlibs/tinydtls/ $sourcedir/tmp/con/extlibs/
cp -R ./extlibs/timer/ $sourcedir/tmp/con/extlibs/
+cp -R ./extlibs/libcoap/ $sourcedir/tmp/con/extlibs/
mkdir -p $sourcedir/tmp/con/c_common
cp -R ./resource/c_common/* $sourcedir/tmp/con/c_common/
cp -R ./resource/csdk/logger/include/* $sourcedir/tmp/con/common/inc/
mkdir -p %{DEST_LIB_DIR}/pkgconfig
cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
-cp -f %{ROOTDIR}/con/lib/libcoap-4.1.1/libcoap.a %{buildroot}/%{_libdir}
+cp -f %{ROOTDIR}/extlibs/libcoap/libcoap.a %{buildroot}/%{_libdir}
if echo %{SECURED}|grep -qi '1'; then
cp -f %{ROOTDIR}/con/extlibs/tinydtls/libtinydtls.a %{buildroot}/%{_libdir}
fi
#include "cacommon.h"
#include "logger.h"
-#include "pdu.h"
+#include <coap/pdu.h>
#include "uarraylist.h"
#include "cacommonutil.h"
#include <stdint.h>
-#include "coap.h"
+#include <coap/coap.h>
#include "cathreadpool.h"
#include "camutex.h"
#include "uarraylist.h"
#define CA_MESSAGE_HANDLER_H_
#include "cacommon.h"
-#include "coap.h"
+#include <coap/coap.h>
#define CA_MEMORY_ALLOC_CHECK(arg) { if (NULL == arg) {OIC_LOG(ERROR, TAG, "Out of memory"); \
goto memory_error_exit;} }
#define CA_PROTOCOL_MESSAGE_H_
#include "cacommon.h"
-#include "config.h"
-#include "coap.h"
+#ifndef WITH_UPSTREAM_LIBCOAP
+#include "coap/config.h"
+#endif
+#include <coap/coap.h>
#ifdef __cplusplus
extern "C"
#include "caadapterinterface.h"
#include "cathreadpool.h"
#include "cainterface.h"
-#include "pdu.h"
+#include <coap/pdu.h>
#ifdef __cplusplus
extern "C"
+++ /dev/null
-##
-# libcoap (share library) build script
-##
-
-Import('env')
-
-libcoap_env = env.Clone()
-
-target_os = env.get('TARGET_OS')
-ca_transport = env.get('TARGET_TRANSPORT')
-with_tcp = env.get('WITH_TCP')
-# As in the source code(C) includes arduino Time library head file(C++)
-# It requires compile the .c with g++
-if target_os == 'arduino':
- libcoap_env.Replace(CFLAGS = env.get('CXXFLAGS'))
-
-######################################################################
-# Build flags
-######################################################################
- libcoap_env.PrependUnique(CPPPATH = [
- './',
- env.get('ARDUINO_HOME')+'/',
- env.get('ARDUINO_HOME')+'/hardware/arduino/avr/cores/arduino',
- env.get('ARDUINO_HOME')+'/hardware/tools/avr/avr/include/',
- env.get('ARDUINO_HOME')+'/hardware/arduino/avr/variants/mega',
- env.get('ARDUINO_HOME')+'/libraries/Time/Time',
- env.get('ARDUINO_HOME')+'/libraries/TimedAction',
- env.get('ARDUINO_HOME')+'/hardware/arduino/avr/libraries/SPI',
- env.get('ARDUINO_HOME')+'/libraries/Ethernet/src/utility',
- ])
-
-if target_os not in ['arduino', 'windows', 'msys_nt']:
- libcoap_env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '_DEFAULT_SOURCE'])
- libcoap_env.AppendUnique(CFLAGS = ['-std=gnu99','-fPIC'])
-
-if target_os not in ['windows']:
- libcoap_env.AppendUnique(CFLAGS = ['-Wall', '-ffunction-sections',
- '-fdata-sections', '-fno-exceptions'])
-
-if target_os == 'msys_nt':
- libcoap_env.AppendUnique(CPPDEFINES = ['_DEFAULT_SOURCE'])
- libcoap_env.AppendUnique(CFLAGS = ['-std=c99'])
-
-if target_os in ['linux', 'tizen', 'android', 'ios', 'arduino']:
- if with_tcp == True:
- libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
-
-if target_os in ['linux', 'tizen', 'android', 'arduino']:
- libcoap_env.AppendUnique(LIBS = ['log'])
- if (('BLE' in ca_transport) or ('BT' in ca_transport) or ('ALL' in ca_transport)):
- libcoap_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
-
-if target_os == 'arduino':
- libcoap_env.AppendUnique(CPPDEFINES = ['NDEBUG', 'WITH_ARDUINO'])
-
-if target_os in ['darwin', 'ios']:
- libcoap_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
-
-if env.get('LOGGING'):
- libcoap_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
-
-######################################################################
-# Source files and Target(s)
-######################################################################
-libcoap_src = [
- 'pdu.c',
- 'net.c',
- 'debug.c',
- 'encode.c',
- 'uri.c',
- 'coap_list.c',
- 'resource.c',
- 'hashkey.c',
- 'str.c',
- 'option.c',
- 'async.c',
- 'subscribe.c',
- 'block.c'
- ]
-
-libcoap = libcoap_env.StaticLibrary('coap', libcoap_src, OBJPREFIX='libcoap_')
-
-libcoap_env.InstallTarget([libcoap], 'coap')
#ifndef WITHOUT_ASYNC
-#include "config.h"
-
-#include "utlist.h"
-
-#include "mem.h"
-#include "debug.h"
-#include "async.h"
+#include "include/coap/config.h"
+#include "include/coap/utlist.h"
+#include "include/coap/mem.h"
+#include "include/coap/debug.h"
+#include "include/coap/async.h"
coap_async_state_t *
coap_register_async(coap_context_t *context, coap_address_t *peer, coap_pdu_t *request,
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
#include <stdlib.h>
#endif
-#include "debug.h"
-#include "block.h"
+#include "include/coap/debug.h"
+#include "include/coap/block.h"
#define min(a,b) ((a) < (b) ? (a) : (b))
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#include <stdio.h>
#include <string.h>
-#include "debug.h"
-#include "mem.h"
-#include "coap_list.h"
+#include "include/coap/debug.h"
+#include "include/coap/mem.h"
+#include "include/coap/coap_list.h"
int coap_insert(coap_list_t **queue, coap_list_t *node, int (*order)(void *, void *node))
{
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
#include <time.h>
#endif
-#include "debug.h"
-#include "net.h"
+#include "include/coap/debug.h"
+#include "include/coap/net.h"
#ifdef WITH_CONTIKI
# ifndef DEBUG
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
# include <stdio.h>
#endif
-#include "config.h"
-#include "encode.h"
-#include "option.h"
+#include "include/coap/encode.h"
+#include "include/coap/option.h"
/* Carsten suggested this when fls() is not available: */
int coap_fls(unsigned int i)
* README for terms of use.
*/
-#include "hashkey.h"
+#include "include/coap/hashkey.h"
/* Caution: When changing this, update COAP_DEFAULT_WKC_HASHKEY
* accordingly (see int coap_hash_path());
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#include <ctype.h>
#include <stdio.h>
#include <lwip/timers.h>
#endif
-#include "debug.h"
-#include "mem.h"
-#include "str.h"
-#include "async.h"
-#include "resource.h"
-#include "option.h"
-#include "encode.h"
-#include "block.h"
-#include "net.h"
+#include "include/coap/debug.h"
+#include "include/coap/mem.h"
+#include "include/coap/str.h"
+#include "include/coap/async.h"
+#include "include/coap/resource.h"
+#include "include/coap/option.h"
+#include "include/coap/encode.h"
+#include "include/coap/block.h"
+#include "include/coap/net.h"
#if defined(WITH_POSIX) || defined(WITH_ARDUINO) || defined(_WIN32)
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
#include <stdio.h>
#include <string.h>
-#include "option.h"
-#include "debug.h"
-#include "pdu.h"
+#include "include/coap/option.h"
+#include "include/coap/debug.h"
+#include "include/coap/pdu.h"
coap_opt_t *
options_start(coap_pdu_t *pdu, coap_transport_type transport)
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
#include <winsock2.h>
#endif
-#include "debug.h"
-#include "pdu.h"
-#include "option.h"
-#include "encode.h"
+#include "include/coap/debug.h"
+#include "include/coap/pdu.h"
+#include "include/coap/option.h"
+#include "include/coap/encode.h"
#ifdef WITH_ARDUINO
#include "util.h"
memb_init(&pdu_storage);
}
#else /* WITH_CONTIKI */
-#include "mem.h"
+#include "include/coap/mem.h"
#endif /* WITH_CONTIKI */
void coap_pdu_clear(coap_pdu_t *pdu, size_t size, coap_transport_type transport, unsigned int length)
{
return coap_tcp_16bit;
}
- else //if (size - COAP_TCP_LENGTH_FIELD_32_BIT < ULONG_MAX) always true due to range of data types
+ else
{
return coap_tcp_32bit;
}
* README for terms of use.
*/
-#include "config.h"
-#include "net.h"
-#include "debug.h"
-#include "resource.h"
-#include "subscribe.h"
+#include "include/coap/config.h"
+#include "include/coap/net.h"
+#include "include/coap/debug.h"
+#include "include/coap/resource.h"
+#include "include/coap/subscribe.h"
#ifdef WITH_LWIP
-#include "utlist.h"
+#include "include/coap/utlist.h"
/* mem.h is only needed for the string free calls for
* COAP_ATTR_FLAGS_RELEASE_NAME / COAP_ATTR_FLAGS_RELEASE_VALUE /
* COAP_RESOURCE_FLAGS_RELEASE_URI. not sure what those lines should actually
* do on lwip. */
-#include "mem.h"
+#include "include/coap/mem.h"
#include <lwip/memp.h>
#endif
#if defined(WITH_POSIX) || defined(WITH_ARDUINO) || defined(_WIN32)
-#include "utlist.h"
-#include "mem.h"
+#include "include/coap/utlist.h"
+#include "include/coap/mem.h"
#define COAP_MALLOC_TYPE(Type) \
((coap_##Type##_t *)coap_malloc(sizeof(coap_##Type##_t)))
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#include <stdio.h>
-#include "debug.h"
-#include "mem.h"
-#include "str.h"
+#include "include/coap/debug.h"
+#include "include/coap/mem.h"
+#include "include/coap/str.h"
str *coap_new_string(size_t size)
{
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
/* #include "resource.h" */
-#include "mem.h"
-#include "encode.h"
-#include "debug.h"
-#include "subscribe.h"
+#include "include/coap/mem.h"
+#include "include/coap/encode.h"
+#include "include/coap/debug.h"
+#include "include/coap/subscribe.h"
void coap_subscription_init(coap_subscription_t *s)
{
* README for terms of use.
*/
-#include "config.h"
+#include "include/coap/config.h"
#if defined(HAVE_ASSERT_H) && !defined(assert)
# include <assert.h>
#include <string.h>
#include <ctype.h>
-#include "mem.h"
-#include "debug.h"
-#include "pdu.h"
-#include "option.h"
-#include "uri.h"
+#include "include/coap/mem.h"
+#include "include/coap/debug.h"
+#include "include/coap/pdu.h"
+#include "include/coap/option.h"
+#include "include/coap/uri.h"
/**
* A length-safe version of strchr(). This function returns a pointer
* to the first occurrence of @p c in @p s, or @c NULL if not found.
##
# CA build script
##
-
import os.path
Import('env')
print"Reading ca script %s"%ca_transport
env.PrependUnique(CPPPATH = [ os.path.join(root_dir, 'api') ])
+
+with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
+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 = [os.path.join('#extlibs', 'libcoap', 'libcoap', 'include')])
+else:
+ # For bring up purposes only, the forked version will live here.
+ env.AppendUnique(CPPPATH = [ os.path.join(root_dir, 'lib', 'libcoap-4.1.1', 'include')])
+
env.AppendUnique(CPPPATH = [ os.path.join(root_dir, 'inc'),
- os.path.join(root_dir, 'lib', 'libcoap-4.1.1'),
os.path.join(src_dir, 'resource', 'csdk', 'logger', 'include'),
os.path.join(root_dir, 'common', 'inc'),
os.path.join(root_dir, 'util', 'inc') ])
#include "caqueueingthread.h"
#include "oic_malloc.h"
#include "caremotehandler.h"
-#include "pdu.h"
+#include <coap/pdu.h>
/**
* Logging tag for module name.
#include <boards.h>
#include <RBL_nRF8001.h>
-#include "pdu.h"
+#include <coap/pdu.h>
#include "caleinterface.h"
#include "oic_malloc.h"
#include "caadapterutils.h"
#include "oic_malloc.h"
#include "oic_string.h"
#include "caremotehandler.h"
-#include "pdu.h"
+#include <coap/pdu.h>
/**
* Logging tag for module name.
#include "caremotehandler.h"
#include "caprotocolmessage.h"
#include "logger.h"
-#include "config.h" /* for coap protocol */
+#ifndef WITH_UPSTREAM_LIBCOAP
+#include "coap/config.h"
+#endif
#include "oic_malloc.h"
#include "canetworkconfigurator.h"
#include "caadapterutils.h"
#include <linux/rtnetlink.h>
#endif
-#include "pdu.h"
+#include <coap/pdu.h>
#include "caipinterface.h"
#include "caadapterutils.h"
#ifdef __WITH_DTLS__
#include "catcpadapterutils_eth.h"
#include "catcpinterface.h"
-#include "pdu.h"
+#include <coap/pdu.h>
#include "caadapterutils.h"
#include "camutex.h"
#include "oic_malloc.h"
#endif
#include "catcpinterface.h"
-#include "pdu.h"
+#include <coap/pdu.h>
#include "caadapterutils.h"
#include "camutex.h"
#include "oic_malloc.h"
libocsrm_env = lib_env.Clone()
-target_os = env.get('TARGET_OS')
+target_os = libocsrm_env.get('TARGET_OS')
# As in the source code, it includes arduino Time library (C++)
# It requires compile the .c with g++
if target_os == 'arduino':
- libocsrm_env.Replace(CC = env.get('CXX'))
- libocsrm_env.Replace(CFLAGS = env.get('CXXFLAGS'))
+ libocsrm_env.Replace(CC = libocsrm_env.get('CXX'))
+ libocsrm_env.Replace(CFLAGS = libocsrm_env.get('CXXFLAGS'))
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = libocsrm_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ libocsrm_env.AppendUnique(CPPPATH = ['../connectivity/lib/libcoap-4.1.1/include'])
+
libocsrm_env.PrependUnique(CPPPATH = [
'../../../extlibs/cjson/',
'../../../extlibs/tinydtls/',
'../stack/include',
'../stack/include/internal',
'../../oc_logger/include',
- '../connectivity/lib/libcoap-4.1.1',
'../connectivity/external/inc',
'../connectivity/common/inc',
'../connectivity/inc/pkix',
libocsrm_env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '_GNU_SOURCE'])
libocsrm_env.AppendUnique(CFLAGS = ['-std=c99', '-Wall'])
-libocsrm_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+libocsrm_env.AppendUnique(LIBPATH = [libocsrm_env.get('BUILD_DIR')])
libocsrm_env.AppendUnique(LIBS = ['coap'])
if target_os == 'arduino':
libocsrm_env.AppendUnique(LIBS = ['m'])
if target_os in ['windows', 'msys_nt']:
- libocsrm_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource', 'oc_logger')])
+ libocsrm_env.AppendUnique(LIBPATH = [os.path.join(libocsrm_env.get('BUILD_DIR'), 'resource', 'oc_logger')])
if target_os in ['darwin', 'ios']:
libocsrm_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
- libocsrm_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+ libocsrm_env.AppendUnique(LIBPATH = [libocsrm_env.get('BUILD_DIR')])
libocsrm_env.AppendUnique(LIBS = ['coap'])
if env.get('LOGGING'):
libocsrm_env.InstallTarget(libocsrm, 'ocsrm')
-if target_os in ['linux', 'android', 'tizen', 'msys_nt', 'windows'] and env.get('SECURED') == '1':
+if target_os in ['linux', 'android', 'tizen', 'msys_nt', 'windows'] and libocsrm_env.get('SECURED') == '1':
SConscript('provisioning/SConscript')
-if target_os in ['linux'] and env.get('SECURED') == '1':
+if target_os in ['linux'] and libocsrm_env.get('SECURED') == '1':
SConscript('tool/SConscript')
extern "C"
{
#endif
-#include "uri.h"
+#include <coap/uri.h>
#ifdef __cplusplus
}
#endif
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = provisioning_env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+ # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
+ provisioning_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ provisioning_env.AppendUnique(CPPPATH = ['../../connectivity/lib/libcoap-4.1.1/include'])
+
provisioning_env.AppendUnique(CPPPATH = [
'../../stack/include',
'../../stack/include/internal',
'../../connectivity/inc/pkix',
'../../connectivity/external/inc',
'../../connectivity/common/inc',
- '../../connectivity/lib/libcoap-4.1.1',
'../../connectivity/api',
'../include',
'../include/internal',
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = provisioning_env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+ # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
+ provisioning_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ provisioning_env.AppendUnique(CPPPATH = ['../../../../connectivity/lib/libcoap-4.1.1/include'])
+
provisioning_env.AppendUnique(CPPPATH = [
'../../../../stack/include',
'../../../../../c_common/ocrandom/include',
'../../../../connectivity/inc',
'../../../../connectivity/inc/pkix/',
'../../../../connectivity/common/inc',
- '../../../../connectivity/lib/libcoap-4.1.1',
'../../../../connectivity/api',
'../../../../../c_common/oic_malloc/include',
'../include',
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = provisioning_env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+ # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
+ provisioning_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ provisioning_env.AppendUnique(CPPPATH = ['../../../connectivity/lib/libcoap-4.1.1/include'])
+
provisioning_env.AppendUnique(CPPPATH = [
'../../../stack/include',
'../../../ocrandom/include',
'../../../connectivity/inc',
'../../../connectivity/inc/pkix',
'../../../connectivity/common/inc',
- '../../../connectivity/lib/libcoap-4.1.1',
'../../../connectivity/api',
'cloud'
])
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = sptest_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+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.PrependUnique(CPPPATH = [
'../include',
'../../include',
'../../../connectivity/inc',
'../../../connectivity/inc/pkix',
'../../../connectivity/common/inc',
- '../../../connectivity/lib/libcoap-4.1.1',
'../../../connectivity/api',
'../../../../../extlibs/tinydtls'
])
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = tools_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+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.PrependUnique(CPPPATH = ['../../../../extlibs/cjson',
'../../stack/include',
'../../stack/include/internal',
'../../connectivity/api',
'../../connectivity/inc/pkix',
'../include',
- '../include/internal',
- '../../connectivity/lib/libcoap-4.1.1',
-
+ '../include/internal'
])
tools_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-Wextra', '-std=c++0x'])
-tools_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-tools_env.AppendUnique(RPATH = [env.get('BUILD_DIR')])
+tools_env.AppendUnique(LIBPATH = [tools_env.get('BUILD_DIR')])
+tools_env.AppendUnique(RPATH = [tools_env.get('BUILD_DIR')])
tools_env.PrependUnique(LIBS = ['oc', 'octbstack'])
######################################################################
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = srmtest_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+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.PrependUnique(CPPPATH = [
'../../../c_common/oic_malloc/include',
'../../connectivity/inc',
'../../connectivity/inc/pkix',
'../../connectivity/api',
'../../connectivity/external/inc',
- '../../connectivity/lib/libcoap-4.1.1',
'../include/internal',
'../../logger/include',
'../../stack/include',
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#include "gtest/gtest.h"
-#include "utlist.h"
+#include <coap/utlist.h>
#include <sys/stat.h>
#include "ocstack.h"
#include "psinterface.h"
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = samples_env.get('WITH_UPSTREAM_LIBCOAP')
+if with_upstream_libcoap == '1':
+ # For bring up purposes only, we manually copy the forked version to where the unforked version is downloaded.
+ samples_env.AppendUnique(CPPPATH = ['#extlibs/libcoap/libcoap/include'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ samples_env.AppendUnique(CPPPATH = ['../../../../../connectivity/lib/libcoap-4.1.1/include'])
+
samples_env.PrependUnique(CPPPATH = [
'../../../../logger/include',
'../../../../stack/include',
'../../../../../../extlibs/cjson',
'../../../../../../extlibs/boost/boost',
'../../../../../oc_logger/include',
- '../../../../../connectivity/lib/libcoap-4.1.1'
])
compiler = samples_env.get('CXX')
with_proxy = env.get('WITH_PROXY')
with_tcp = env.get('WITH_TCP')
+with_upstream_libcoap = env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+else:
+ # For bring up purposes only, the forked version will live here.
+ env.AppendUnique(CPPPATH = ['../../../../connectivity/lib/libcoap-4.1.1'])
+
env.PrependUnique(CPPPATH = [
'../../../../logger/include',
'../../../../stack/include',
'../../../../../../extlibs/cjson',
- '../../../../../oc_logger/include',
- '../../../../../connectivity/lib/libcoap-4.1.1'
+ '../../../../../oc_logger/include'
])
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
cp -R ./extlibs/timer $sourcedir/tmp/extlibs
cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
+cp -R ./extlibs/libcoap $sourcedir/tmp/extlibs
cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
cp -R ./resource/csdk/stack/samples/tizen/build/packaging/*.spec $sourcedir/tmp/packaging
cp -R ./resource $sourcedir/tmp/
cp -f %{ROOTDIR}/resource/c_common/libc_common.a %{buildroot}/%{_libdir}
cp -f %{ROOTDIR}/resource/csdk/security/libocsrm.a %{buildroot}/%{_libdir}
cp -f %{ROOTDIR}/resource/csdk/connectivity/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
-cp -f %{ROOTDIR}/resource/csdk/connectivity/lib/libcoap-4.1.1/libcoap.a %{buildroot}/%{_libdir}
+cp -f %{ROOTDIR}/extlibs/libcoap/libcoap.a %{buildroot}/%{_libdir}
cp /usr/lib/libuuid.so.1 %{buildroot}%{_libdir}
if echo %{SECURED}|grep -qi '1'; then
cp -f %{ROOTDIR}/out/tizen/*/*/extlibs/tinydtls/libtinydtls.a %{buildroot}/%{_libdir}
#include "iotivity_config.h"
#include "occlientcb.h"
-#include "utlist.h"
+#include <coap/utlist.h>
#include "logger.h"
#include "oic_malloc.h"
#include <string.h>
#ifdef HAVE_ARDUINO_TIME_H
#include "Time.h"
#endif
-#include "coap_time.h"
+#include <coap/coap_time.h>
#include "cacommon.h"
#include "cainterface.h"
#include "ocserverrequest.h"
#include "logger.h"
-#include "utlist.h"
-#include "pdu.h"
+#include <coap/utlist.h>
+#include <coap/pdu.h>
// Module Name
#include "cacommon.h"
#include "cainterface.h"
-#include "utlist.h"
-#include "pdu.h"
+#include <coap/utlist.h>
+#include <coap/pdu.h>
// Module Name
#define VERIFY_NON_NULL(arg) { if (!arg) {OIC_LOG(FATAL, TAG, #arg " is NULL"); goto exit;} }
OICFree(responseInfo.info.options);
return result;
}
- //Add CONTENT_FORMAT OPT if payload exist
+ // Add CONTENT_FORMAT OPT if payload exist
if (responseInfo.info.payloadSize > 0)
{
responseInfo.info.payloadFormat = CA_FORMAT_APPLICATION_CBOR;
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#include "coap_time.h"
-#include "utlist.h"
-#include "pdu.h"
+#include <coap/coap_time.h>
+#include <coap/utlist.h>
+#include <coap/pdu.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = ocprovision_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+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 = [
'../include/',
'../csdk/stack/include',
'../csdk/security/provisioning/include',
'../csdk/security/provisioning/include/oxm',
'../csdk/security/provisioning/include/internal',
- '../csdk/connectivity/lib/libcoap-4.1.1/',
- '../../extlibs/cjson/'
+ '../../extlibs/cjson/'
])
-target_os = env.get('TARGET_OS')
+target_os = ocprovision_env.get('TARGET_OS')
if target_os not in ['windows']:
ocprovision_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
if target_os == 'android':
ocprovision_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+ ocprovision_env.AppendUnique(LIBPATH = [ocprovision_env.get('BUILD_DIR')])
ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
if target_os in ['linux', 'tizen']:
- ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+ ocprovision_env.AppendUnique(LIBPATH = [ocprovision_env.get('BUILD_DIR')])
ocprovision_env.AppendUnique(LIBS = ['oc', 'octbstack', 'ocpmapi', 'oc_logger', 'boost_thread'])
if target_os in ['darwin', 'ios']:
- ocprovision_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+ ocprovision_env.AppendUnique(LIBPATH = [ocprovision_env.get('BUILD_DIR')])
ocprovision_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
######################################################################
######################################################################
# Build flags
######################################################################
+with_upstream_libcoap = oclib_env.get('WITH_UPSTREAM_LIBCOAP')
+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'])
+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 = [
'../include/',
'../csdk/stack/include',
'../c_common/ocrandom/include',
'../csdk/logger/include',
'../oc_logger/include',
- '../csdk/connectivity/lib/libcoap-4.1.1',
'../csdk/connectivity/api'
])
set LOGGING=OFF
set WITH_RD=1
set ROUTING=EP
+set WITH_UPSTREAM_LIBCOAP=0
-set BUILD_OPTIONS= TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=0 BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% WITH_RD=%WITH_RD% ROUTING=%ROUTING%
+set BUILD_OPTIONS= TARGET_OS=%TARGET_OS% TARGET_ARCH=%TARGET_ARCH% RELEASE=0 WITH_RA=0 TARGET_TRANSPORT=IP SECURED=%SECURED% WITH_TCP=0 BUILD_SAMPLE=ON LOGGING=%LOGGING% TEST=%TEST% WITH_RD=%WITH_RD% ROUTING=%ROUTING% WITH_UPSTREAM_LIBCOAP=%WITH_UPSTREAM_LIBCOAP%
REM *** BUILD OPTIONS ***
echo LOGGING=%LOGGING%
echo WITH_RD=%WITH_RD%
echo ROUTING=%ROUTING%
+ echo WITH_UPSTREAM_LIBCOAP=%WITH_UPSTREAM_LIBCOAP%
CL.exe | findstr "Compiler Verison"
echo.scons VERBOSE=1 %BUILD_OPTIONS%
scons VERBOSE=1 %BUILD_OPTIONS%
env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
env.get('SRC_DIR') + '/resource/include',
env.get('SRC_DIR') + '/resource/csdk/logger/include',
- env.get('SRC_DIR') + '/resource/csdk/stack/include',
- env.get('SRC_DIR') + '/resource/csdk/logger/include',
+ env.get('SRC_DIR') + '/resource/csdk/stack/include',
+ env.get('SRC_DIR') + '/resource/csdk/logger/include',
env.get('SRC_DIR') + '/resource/csdk/security/include',
env.get('SRC_DIR') + '/extlibs/cjson',
env.get('SRC_DIR') + '/extlibs/sqlite3',
env.get('SRC_DIR') + '/service/easy-setup/inc',
'inc'])
if env.get('SECURED') == '1':
+ with_upstream_libcoap = easy_setup_env.get('WITH_UPSTREAM_LIBCOAP')
+ 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'])
+ 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/security/provisioning/include',
env.get('SRC_DIR') + '/resource/csdk/security/include/internal',
env.get('SRC_DIR') + '/resource/csdk/connectivity/api/',
- 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/provisioning/include/oxm'])
if env.get('WITH_TCP') == True:
easy_setup_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
cp -R ./extlibs/timer $sourcedir/tmp/extlibs
cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
+cp -R ./extlibs/libcoap $sourcedir/tmp/extlibs
cp -R ./resource $sourcedir/tmp
cp -R ./service $sourcedir/tmp
cp ./extra_options.scons $sourcedir/tmp