Add source files to tinydtls SConscript
authorDavid Antler <david.a.antler@intel.com>
Tue, 26 Apr 2016 18:43:29 +0000 (11:43 -0700)
committerJon A. Cruz <jon@joncruz.org>
Wed, 27 Apr 2016 06:04:03 +0000 (06:04 +0000)
Debug options were being stored in an environment variable, which is the
old way of doing things.

Change-Id: Ia525707f6cba918b209b9f94323fa49082577592
Signed-off-by: David Antler <david.a.antler@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7933
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
extlibs/tinydtls/SConscript

index 4fd4781c738371fc984536a1fc5052c3fa459989..5d186a25fd1d7af7cc74dda80858a64d5fa45fb6 100644 (file)
@@ -60,20 +60,18 @@ tinydtls_src = [
                 'sha2/sha2.c',
         ]
 
-dtls_env.AppendUnique(TINYDTLS_SRC = tinydtls_src)
-
 if not dtls_env.get('RELEASE'):
        if(target_os) not in ['arduino']:
-               dtls_env.AppendUnique(TINYDTLS_SRC = ['debug.c'])
+               tinydtls_src += ['debug.c']
        else:
                dtls_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
 else:
        dtls_env.AppendUnique(CPPDEFINES = ['NDEBUG'])
 
 dtls_env.AppendUnique(CPPDEFINES = ['DTLSV12',  'WITH_SHA256', 'DTLS_CHECK_CONTENTTYPE', 'SHA2_USE_INTTYPES_H'])
+env.AppendUnique(CPPDEFINES = ['SHA2_USE_INTTYPES_H'])
 
-
-libtinydtls = dtls_env.StaticLibrary('libtinydtls', dtls_env.get('TINYDTLS_SRC'), OBJPREFIX='libtinydtls_')
+libtinydtls = dtls_env.StaticLibrary('tinydtls', tinydtls_src, OBJPREFIX='libtinydtls_')
 
 ######################################################################
 # Generate tinydtls samples
@@ -99,5 +97,5 @@ if not env.get('RELEASE'):
 
        samples_env.AppendTarget('samples')
 
-dtls_env.InstallTarget(libtinydtls, 'libtinydtls');
+dtls_env.InstallTarget(libtinydtls, 'tinydtls');