import os
import platform
-project_version = '1.2.0'
+project_version = '1.2.1'
# Map of host os and allowed target os (host: allowed target os)
host_target_map = {
- 'linux': ['linux', 'android', 'arduino', 'yocto', 'tizen'],
+ 'linux': ['linux', 'android', 'arduino', 'yocto', 'tizen', 'tizenrt'],
'windows': ['windows', 'android', 'arduino'],
'darwin': ['darwin', 'ios', 'android', 'arduino'],
'msys_nt' :['msys_nt'],
'darwin': ['i386', 'x86_64'],
'ios': ['i386', 'x86_64', 'armv7', 'armv7s', 'arm64'],
'arduino': ['avr', 'arm'],
- 'yocto': ['i586', 'i686', 'x86_64', 'arm', 'powerpc', 'powerpc64', 'mips', 'mipsel'],
+ 'yocto': ['i586', 'i686', 'x86_64', 'arm', 'aarch64', 'powerpc', 'powerpc64', 'mips', 'mipsel'],
+ 'tizenrt': ['armv7-r', 'armv7-m'],
}
host = platform.system().lower()
help_vars.Add(BoolVariable('WITH_RA', 'Build with Remote Access module', False))
help_vars.Add(BoolVariable('WITH_TCP', 'Build with TCP adapter', False))
+help_vars.Add(BoolVariable('DISABLE_TCP_SERVER', 'Disable TCP server', False))
help_vars.Add(BoolVariable('WITH_PROXY', 'Build with CoAP-HTTP Proxy', False))
help_vars.Add(ListVariable('WITH_MQ', 'Build with MQ publisher/broker', 'OFF', ['OFF', 'SUB', 'PUB', 'BROKER']))
help_vars.Add(BoolVariable('WITH_CLOUD', 'Build including AccountManager class and Cloud Client sample', False))
help_vars.Add(ListVariable('RD_MODE', 'Resource Directory build mode', 'CLIENT', ['CLIENT', 'SERVER']))
+help_vars.Add(BoolVariable('DISABLE_PRESENCE', 'Disable Presence Feature', False))
+help_vars.Add(BoolVariable('DISABLE_BLE_SERVER', 'Disable BLE server', False))
help_vars.Add(BoolVariable('SIMULATOR', 'Build with simulator module', False))
help_vars.Add(BoolVariable('WITH_RA_IBB', 'Build with Remote Access module(workssys)', False))
-
+help_vars.Add(BoolVariable('WITH_ASAN', 'Build with Address Sanitizer support', False))
if target_os in targets_disallow_multitransport:
help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'IP', ['BT', 'BLE', 'IP', 'NFC']))
help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os]))
help_vars.Add(EnumVariable('SECURED', 'Build with DTLS', '0', allowed_values=('0', '1')))
+help_vars.Add(EnumVariable('WITH_MBEDTLS_STATIC_LIB', 'Build mbedTLS library as static library', '0', allowed_values=('0', '1')))
help_vars.Add(EnumVariable('MULTIPLE_OWNER', 'Enable multiple owner', '0', allowed_values=('0', '1')))
+help_vars.Add(EnumVariable('EXC_PROV_SUPPORT', 'Except OCPMAPI library(libocpmapi.so)', '0', allowed_values=('0', '1')))
help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1')))
help_vars.Add(BoolVariable('LOGGING', 'Enable stack logging', logging_default))
+help_vars.Add(EnumVariable('LOG_LEVEL', 'Enable stack logging level', 'DEBUG', allowed_values=('DEBUG', 'INFO', 'ERROR', 'WARNING', 'FATAL')))
help_vars.Add(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_upload))
help_vars.Add(EnumVariable('ROUTING', 'Enable routing', 'EP', allowed_values=('GW', 'EP')))
help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
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')))
-
+help_vars.Add(EnumVariable('BLE_CUSTOM_ADV', 'Build with CUSTOM Advertisement', 'False', allowed_values=('True', 'False')))
+help_vars.Add(EnumVariable('BLE_DIVISION', 'BLE Build with division code', 'OFF', allowed_values=('OFF', 'MCD', 'VD')))
+help_vars.Add(EnumVariable('BLE_TIZEN_30', 'Build with tizen 3.0 BLE api', 'False', allowed_values=('True', 'False')))
+help_vars.Add(EnumVariable('BLE_TIZEN_40', 'Build with tizen 4.0 BLE api', 'False', allowed_values=('True', 'False')))
+help_vars.Add(EnumVariable('BLE_TIZEN_55', 'Build with tizen 5.5 BLE api', 'False', allowed_values=('True', 'False')))
+help_vars.Add(PathVariable('TIZENRT_OS_DIR', 'Absolute Path to TizenRT OS directory', None, PathVariable.PathAccept))
+help_vars.Add(EnumVariable('PLATFORM_TLS', 'Use platform tls instead of local mbedtls', '0', allowed_values=('0', '1')))
+help_vars.Add(EnumVariable('OIC_SUPPORT_TIZEN_TRACE', 'Tizen Trace(T-trace) api availability', 'False', allowed_values=('True', 'False')))
+help_vars.Add(BoolVariable('WITH_PROCESS_EVENT','Build including process event logics in ocstack', 'False'))
+help_vars.Add(BoolVariable('DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY', 'Disable auto-discovery of NSProvider over TCP for TCP connected events', False))
AddOption('--prefix',
dest='prefix',
type='string',
######################################################################
# Platform(build target) specific options: SDK/NDK & toolchain
######################################################################
-targets_support_cc = ['linux', 'arduino', 'tizen']
+targets_support_cc = ['linux', 'arduino', 'tizen', 'tizenrt']
if target_os in targets_support_cc:
# Set cross compile toolchain
PREFIX = GetOption('prefix'),
LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR') #for 64bit build
)
+
+targets_support_gcov = ['linux', 'darwin']
+if target_os in targets_support_gcov:
+ # Build option to enable coverage checking using gcov.
+ # Requires gcc or clang family compilers.
+ # Actual compiler flags need to be set in target-specific script.
+ help_vars.Add(
+ BoolVariable('COVERAGE_CHECKS',
+ 'Build support for running code coverage checks',
+ default=False))
+
Help(help_vars.GenerateHelpText(env))
tc_set_msg = '''
env.AppendUnique(CCFLAGS = ['--sysroot=' + sys_root])
env.AppendUnique(LINKFLAGS = ['--sysroot=' + sys_root])
+ if target_os == 'tizenrt':
+ env.PrependENVPath('PATH', os.environ['PATH'])
+
if prefix or tc_path:
print tc_set_msg
elif env.get('ROUTING') == 'EP':
defines.append('-DROUTING_EP=1')
+if env.get('WITH_TCP'):
+ defines.append('-DTCP_ADAPTER=1')
+ if env.get('SECURED') == '1':
+ defines.append('-D__WITH_TLS__=1')
+
+if env.get('DISABLE_TCP_SERVER'):
+ defines.append('-DDISABLE_TCP_SERVER=1')
+
+if env.get('DISABLE_PRESENCE') == False:
+ env.AppendUnique(CPPDEFINES = ['WITH_PRESENCE'])
+
+if env.get('DISABLE_BLE_SERVER'):
+ defines.append('-DDISABLE_BLE_SERVER=1')
+
+if env.get('WITH_PROCESS_EVENT'):
+ env.AppendUnique(CPPDEFINES=['WITH_PROCESS_EVENT'])
+
+if env.get('DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY'):
+ env.AppendUnique(CPPDEFINES = ['DISABLE_AUTO_TCP_NSPROVIDER_DISCOVERY'])
+
+libs = []
+if env.get('SECURED') == '1':
+ defines.append('-D__WITH_DTLS__=1')
+ if env.get('EXC_PROV_SUPPORT') == '0':
+ libs.append('-locpmapi') # CAPI
+ libs.append('-locprovision') # C++API
+
pc_vars = {
'\@VERSION\@': project_version,
'\@PREFIX\@': user_prefix,
'\@EXEC_PREFIX\@': user_prefix,
'\@LIB_INSTALL_DIR\@': user_lib,
- '\@DEFINES\@': " ".join(defines)
+ '\@DEFINES\@': " ".join(defines),
+ '\@LIBS\@': " ".join(libs)
}
env.Substfile(pc_file, SUBST_DICT = pc_vars)