X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=build_common%2FSConscript;h=4554e039929652baaea9fde3a5c5c98a7e30506e;hb=0d1a98d360977b8d967129282ff8644f363c5e79;hp=f71d250bcd906b5826a93fd47dbee4cfeea5d949;hpb=8754a91b157e957b0c0ade9f07804cde2b3cd225;p=platform%2Fupstream%2Fiotivity.git diff --git a/build_common/SConscript b/build_common/SConscript index f71d250..4554e03 100644 --- a/build_common/SConscript +++ b/build_common/SConscript @@ -18,7 +18,7 @@ host_target_map = { # Map of os and allowed archs (os: allowed archs) os_arch_map = { - 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'arm64'], + 'linux': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], 'tizen': ['x86', 'x86_64', 'arm', 'arm-v7a', 'armeabi-v7a', 'arm64'], 'android': ['x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'], 'windows': ['x86', 'amd64', 'arm'], @@ -26,7 +26,7 @@ os_arch_map = { 'darwin': ['i386', 'x86_64'], 'ios': ['i386', 'x86_64', 'armv7', 'armv7s', 'arm64'], 'arduino': ['avr', 'arm'], - 'yocto': ['i586', 'x86_64', 'arm', 'powerpc', 'powerpc64', 'mips', 'mipsel'], + 'yocto': ['i586', 'i686', 'x86_64', 'arm', 'powerpc', 'powerpc64', 'mips', 'mipsel'], } host = platform.system().lower() @@ -66,6 +66,8 @@ require_upload = ARGUMENTS.get('UPLOAD', False) # 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: @@ -74,6 +76,11 @@ else: release_mode = True logging_default = (release_mode == False) +# targets that do not support the DTLS build (SECURED=1 build option) +targets_without_dtls_support = ['arduino']; +if ARGUMENTS.get('SECURED') == '1' and target_os in targets_without_dtls_support: + print "\nError: DTLS not supported on target os: %s MUST build with SECURED=0\n" % (target_os) + Exit(1) ###################################################################### # Common build options (release, target os, target arch) @@ -88,6 +95,7 @@ help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map 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('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'])) @@ -104,7 +112,7 @@ else: 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('DTLS_WITH_X509', 'DTLS with X.509 support', '0', allowed_values=('0', '1'))) +help_vars.Add(EnumVariable('MULTIPLE_OWNER', 'Enable multiple owner', '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(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_upload)) @@ -114,6 +122,7 @@ help_vars.AddVariables(('DEVICE_NAME', 'Network display name for device (For Ard 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', @@ -433,52 +442,6 @@ conf = Configure(env, # POSIX_SUPPORTED, 1 if it is supported, 0 otherwise conf.CheckPThreadsSupport() -###################################################################### -# Generate macros for presence of headers -###################################################################### -cxx_headers = ['arpa/inet.h', - 'fcntl.h', - 'grp.h', - 'in6addr.h', - 'linux/limits.h', - 'memory.h', - 'netdb.h', - 'netinet/in.h', - 'pthread.h', - 'pwd.h', - 'stdlib.h', - 'string.h', - 'strings.h', - 'sys/socket.h', - 'sys/stat.h', - 'sys/time.h', - 'sys/timeb.h', - 'sys/types.h', - 'sys/unistd.h', - 'syslog.h', - 'time.h', - 'unistd.h', - 'uuid/uuid.h', - 'windows.h', - 'winsock2.h', - 'ws2tcpip.h'] - -if target_os == 'arduino': - # Detection of headers on the Arduino platform is currently broken. - cxx_headers = [] - -if target_os == 'msys_nt': - # WinPThread provides a pthread.h, but we want to use native threads. - cxx_headers.remove('pthread.h') - -def get_define_from_header_file(header_file): - header_file_converted = header_file.replace("/","_").replace(".","_").upper() - return "HAVE_" + header_file_converted - -for header_file_name in cxx_headers: - if conf.CheckCXXHeader(header_file_name): - conf.env.AppendUnique(CPPDEFINES = [get_define_from_header_file(header_file_name)]) - env = conf.Finish() ######################################################################