Merge branch '1.3-rel (82aa07b) 77/22477/2
authorGeorge Nash <george.nash@intel.com>
Thu, 14 Sep 2017 22:15:43 +0000 (15:15 -0700)
committerGeorge Nash <george.nash@intel.com>
Thu, 14 Sep 2017 22:15:43 +0000 (15:15 -0700)
Relate-to:
https://gerrit.iotivity.org/gerrit/22227
https://gerrit.iotivity.org/gerrit/21895
https://gerrit.iotivity.org/gerrit/21631
https://gerrit.iotivity.org/gerrit/21673
https://gerrit.iotivity.org/gerrit/22131
https://gerrit.iotivity.org/gerrit/21475
https://gerrit.iotivity.org/gerrit/21981
https://gerrit.iotivity.org/gerrit/22175
https://gerrit.iotivity.org/gerrit/21913
https://gerrit.iotivity.org/gerrit/22025
https://gerrit.iotivity.org/gerrit/22293
https://gerrit.iotivity.org/gerrit/22015
https://gerrit.iotivity.org/gerrit/21743
https://gerrit.iotivity.org/gerrit/22299
https://gerrit.iotivity.org/gerrit/22125
https://gerrit.iotivity.org/gerrit/22257

Conflicts:
    build_common/linux/SConscript
    extlibs/android/sdk/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: I713e205c601439bf590a89e4dc6b440f2b6bce00
Signed-off-by: George Nash <george.nash@intel.com>
21 files changed:
1  2 
build_common/SConscript
build_common/linux/SConscript
resource/csdk/connectivity/src/SConscript
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/resource-directory/src/rd_server.c
resource/csdk/resource-directory/unittests/rdtests.cpp
resource/csdk/security/provisioning/src/ocprovisioningmanager.c
resource/csdk/security/src/deviceonboardingstate.c
resource/csdk/security/src/doxmresource.c
resource/csdk/security/src/pstatresource.c
resource/csdk/security/src/resourcemanager.c
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/octbstack_product.def
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/csdk/stack/src/occollection.c
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocserverrequest.c
resource/csdk/stack/test/stacktests.cpp
resource/include/OCSerialization.h
resource/src/InProcClientWrapper.cpp

@@@ -823,48 -812,46 +813,84 @@@ conf = Configure
  # threading and mutexes.  This will set the environment variable
  # POSIX_SUPPORTED, 1 if it is supported, 0 otherwise
  conf.CheckPThreadsSupport()
 -
  env = conf.Finish()
 +
  ######################################################################
 +# Generate Cbor from json files
 +######################################################################
 +json2cbor = env.get('BUILD_DIR') + 'resource/csdk/security/tool/json2cbor' + env.get('PROGSUFFIX')
 +
 +def generate_actions(source, target, env, for_signature):
 +    Depends(target, json2cbor)
 +    return " %s %s %s" % (json2cbor, source[0], target[0])
 +
 +builder = Builder(generator = generate_actions,
 +                  suffix = '.dat',
 +                  src_suffix = '.json')
 +
 +env.Append(BUILDERS = {'Cbor' : builder})
 +
 +
 +def ScanJSON(env, directory):
 +    targets = []
 +    if env.GetOption('clean') or env.get('SECURED') != '1':
 +        return targets
 +    dst_dir = env.get('BUILD_DIR') + '/' + directory + '/'
 +    src_dir = env.get('SRC_DIR') + '/' + directory + '/'
 +    for json_file in Glob('*.json'):
 +        targets += env.Install(dst_dir, str(json_file))
 +        if env.get('CROSS_COMPILE') != None:
 +            cbor_file = src_dir + re.sub('\.json$', '.dat', str(json_file))
 +            targets += Install(dst_dir, cbor_file)
 +        else:
 +            cbor_file = env.Cbor(json_file)
 +            targets.append(cbor_file)
 +            cbor_file = Flatten(cbor_file)[0].name
 +            src = dst_dir + cbor_file
 +            dst = src_dir + cbor_file
 +            Command(dst, src, Copy("$TARGET", "$SOURCE"))
  
 +    return targets
 +
 +AddMethod(env, ScanJSON)
 +
 +######################################################################
  env.SConscript('external_libs.scons')
  
+ # these variables depend on a subsidiary script having set a path to
+ # use as the default. Such paths may include embedded version strings,
+ # for example, and we want to not embed those all over, so defer setting
+ # the help until we're back from those scripts. Then we can finally
+ # build the help message. However, it's also possible that we never
+ # needed to call those subsidary scripts, and then we come back with
+ # values unset, so deal with that as well.
+ if env.get('ANDROID_NDK'):
+     android_ndk = env['ANDROID_NDK']
+ else:
+     android_ndk = None
+ if env.get('ANDROID_GRADLE'):
+     android_gradle = env['ANDROID_GRADLE']
+ else:
+     android_gradle = None
+ if env.get('ANDROID_HOME'):
+     android_sdk = env['ANDROID_HOME']
+ else:
+     android_sdk = None
+ help_vars.AddVariables(
+     PathVariable('ANDROID_NDK',
+                  'Android NDK path',
+                  default=android_ndk,
+                  validator=PathVariable.PathAccept),
+     PathVariable('ANDROID_GRADLE',
+                  'Gradle executable location',
+                  default=android_gradle,
+                  validator=PathVariable.PathIsFile),
+     PathVariable('ANDROID_HOME',
+                  'Android SDK path',
+                  default=android_sdk,
+                  validator=PathVariable.PathAccept),
+ )
+ help_vars.Update(env)
+ Help(help_vars.GenerateHelpText(env, sort=cmp))
  Return('env')
@@@ -6,13 -6,6 +6,11 @@@
  import os
  Import('env')
  
- src_dir = env.get('SRC_DIR')
 +# Test Coverage Flags and Library (if RELEASE=0)
 +if not env.get('RELEASE'):
 +    env.AppendUnique(LIBS=['gcov'])
 +    env.AppendUnique(CCFLAGS=['--coverage', '-fPIC', '-O0'])
 +
  # Add the default lib directory
  build_dir = env.get('BUILD_DIR')
  env.AppendUnique(LIBPATH=[build_dir])
@@@ -160,24 -148,27 +160,32 @@@ if 'NFC' in ca_transport
  if ca_os in ['linux', 'tizen', 'android', 'ios', 'windows'] and with_tcp:
      transports.add('tcp_adapter')
  
 -SConscript(dirs = list(transports), exports='connectivity_env')
 +SConscript(dirs=list(transports), exports='connectivity_env')
  
+ # prevent unused-parameter warning from bluez-glue.c and object_manager-glue.c
+ # files when building bt_le_adapter. These files are generated by a tool and
+ # should not be changed. We should not be hiding the unused-parameter but in
+ # this limited case a exception is made.
+ if ca_os in ['linux']:
+     if 'bt_le_adapter' in transports:
+         connectivity_env.AppendUnique(CCFLAGS=['-Wno-unused-parameter'])
  if ca_os == 'android':
 -    connectivity_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libca-interface.so'])
 -    connectivity_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libconnectivity_abstraction.so'])
 +    connectivity_env.AppendUnique(LINKFLAGS=['-Wl,-soname,libca-interface.so'])
 +    connectivity_env.AppendUnique(
 +        LINKFLAGS=['-Wl,-soname,libconnectivity_abstraction.so'])
  
  if connectivity_env.get('SECURED') == '1':
 -    connectivity_env.AppendUnique(LIBS = ['mbedtls','mbedx509'])
 +    connectivity_env.AppendUnique(LIBS=['mbedtls', 'mbedx509'])
 +
 +if ca_os in ['tizen']:
 +    connectivity_env.AppendUnique(LIBS=['pthread'])
  
  # c_common calls into mbedcrypto.
 -connectivity_env.AppendUnique(LIBS = ['mbedcrypto'])
 +connectivity_env.AppendUnique(LIBS=['mbedcrypto'])
  
 -calib_internal = connectivity_env.StaticLibrary('connectivity_abstraction_internal', connectivity_env.get('CA_SRC'))
 +calib_internal = connectivity_env.StaticLibrary(
 +    'connectivity_abstraction_internal', connectivity_env.get('CA_SRC'))
  calib = Flatten(calib_internal)
  
  if ca_os in ['android', 'tizen', 'linux', 'yocto']:
@@@ -27,8 -27,9 +27,9 @@@
  #include "amaclresource.h"
  #include "oic_malloc.h"
  #include "oic_string.h"
 -#include "logger.h"
 +#include "experimental/logger.h"
  #include "utlist.h"
+ #include "psinterface.h"
  
  //#ifdef DIRECT_PAIRING
  #include "pconfresource.h"
Simple merge
Simple merge
Simple merge