env.AppendUnique(CPPDEFINES=['_DARWIN_C_SOURCE'])
if (env.get('SECURED') == '1'):
+ env.AppendUnique(CPPDEFINES=['SECURED'])
env.AppendUnique(CPPDEFINES=['__WITH_DTLS__'])
if ((env.get('SECURED') == '1') and with_tcp):
if with_ra_ibb:
env.AppendUnique(CPPDEFINES=['RA_ADAPTER_IBB'])
-env.SConscript('external_builders.scons')
+if env.get('RELEASE'):
+ env.AppendUnique(CPPDEFINES=['NDEBUG'])
+env.SConscript('external_builders.scons')
######################################################################
# Link scons to Yocto cross-toolchain ONLY when target_os is yocto
######################################################################
'''
Additional flags to pass to the Yocto toolchain.
'''
- if env.get('RELEASE'):
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
env.AppendUnique(CPPDEFINES=['__linux__', '_GNU_SOURCE'])
env.AppendUnique(CFLAGS=['-std=gnu99'])
env.AppendUnique(CCFLAGS=['-Wall', '-Wextra', '-fPIC'])
env.AppendUnique(LIBS=['dl', 'pthread', 'uuid'])
- Export('env')
else:
'''
If target_os is not Yocto, continue with the regular build process
# in for windows till after the windows target has run.
env.SConscript('external_builders.scons')
env.SConscript('external_libs.scons')
+
Return('env')
######################################################################
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
env.AppendUnique(LINKFLAGS=['-s'])
else:
env.AppendUnique(CCFLAGS=['-g'])
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
env.AppendUnique(CPPDEFINES=['WITH_POSIX', '__ANDROID__'])
env.AppendUnique(CCFLAGS=['-Wall', '-Wextra', '-fPIC'])
-env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
env.AppendUnique(LIBPATH=[src_dir + '/resource/csdk/connectivity/lib/android'])
env.AppendUnique(LIBS=['log', 'coap'])
# Debug/release relative flags
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
else:
env.AppendUnique(CCFLAGS=['-g'])
# Set release/debug flags
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
else:
env.AppendUnique(CCFLAGS=['-g'])
env.AppendUnique(LINKFLAGS=['-g'])
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
if env.get('SECURED') == '1':
env.AppendUnique(LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
# Set release/debug flags
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
else:
env.AppendUnique(CCFLAGS=['-g'])
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
env.AppendUnique(CPPDEFINES=['WITH_POSIX', '__linux__'])
env.AppendUnique(CFLAGS=['-std=gnu99'])
env.AppendUnique(CCFLAGS=['-Wall', '-Wextra', '-fPIC'])
if env['TARGET_OS'] == 'msys_nt':
env['SHLIBPREFIX'] = 'lib'
-env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
-
# Add MinGW-specific libraries
env.AppendUnique(
LIBS=['bcrypt', 'ws2_32', 'advapi32', 'iphlpapi', 'crypt32', 'kernel32'])
if env['CC'] == 'gcc':
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['-Os'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
else:
env.AppendUnique(CCFLAGS=['-g'])
env.AppendUnique(CFLAGS=['-std=c99'])
print "Reading linux configuration script"
-# Set release/debug flags
-if env.get('RELEASE'):
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
-
-if env.get('LOGGING'):
- env.AppendUnique(CPPDEFINES=['-DTB_LOG'])
-
env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
env.AppendUnique(CPPDEFINES=['WITH_POSIX', '__linux__'])
env.AppendUnique(CFLAGS=['-std=gnu99'])
env.ParseConfig("pkg-config dlog --cflags --libs")
if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
env.ParseConfig("pkg-config ttrace --cflags --libs")
+ env.AppendUnique(CPPDEFINES=['OIC_SUPPORT_TIZEN_TRACE'])
# Set arch flags : It will be handled by Tizen build system.
# Set release/debug flags
if env.get('RELEASE'):
env.AppendUnique(CCFLAGS=['/MD', '/O2', '/GF'])
- env.AppendUnique(CPPDEFINES=['NDEBUG'])
else:
env.AppendUnique(CCFLAGS=['/MDd', '/Od', '/RTC1'])
env.AppendUnique(LINKFLAGS=['/debug'])
- env.AppendUnique(LIBPATH=[env.get('BUILD_DIR')])
# Work around [IOT-1986]
# During some Windows multi-threaded builds, SCons/Python/Pywin32 appear to try
if env.get('WITH_TCP') == True:
notification_test_env.AppendUnique(CPPDEFINES=['WITH_TCP'])
if env.get('SECURED') == '1':
- notification_test_env.AppendUnique(CPPDEFINES=['SECURED'])
notification_test_env.AppendUnique(
LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
notification_test_env.AppendUnique(