Import('env')
-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'])
-
lib_env = env.Clone()
SConscript('#service/third_party_libs.scons', 'lib_env')
scenemanager_env = lib_env.Clone()
target_os = env.get('TARGET_OS')
+
+if scenemanager_env.get('RELEASE'):
+ scenemanager_env.AppendUnique(CCFLAGS=['-Os'])
+else:
+ scenemanager_env.AppendUnique(CCFLAGS=['-g'])
######################################################################
# Build flags
######################################################################
'../resource-encapsulation/include',
'../resource-encapsulation/src/common/primitiveResource/include',
'../resource-encapsulation/src/common/expiryTimer/include',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
'#/resource/include',
SConscript('#service/third_party_libs.scons', 'lib_env')
scenemanager_sample_env = lib_env.Clone()
rd_mode = lib_env.get('RD_MODE')
+target_os = lib_env.get('TARGET_OS')
######################################################################
# Build flags
'../../src',
'#/service/resource-encapsulation/include',
'#/extlibs/cjson',
+ '#/resource/c_common',
+ '#/resource/c_common/oic_malloc/include',
+ '#/resource/c_common/oic_string/include',
'#/resource/csdk/connectivity/api',
'#/resource/csdk/include',
'#/resource/csdk/stack/include',
scenemanager_sample_env.AppendUnique(
LIBS=['mbedtls', 'mbedx509', 'mbedcrypto'])
-if 'rt' in scenemanager_sample_env.get('LIBS'):
- scenemanager_sample_env.Append(LIBS=['rt'])
-
if not env.get('RELEASE'):
scenemanager_sample_env.PrependUnique(LIBS=['gcov'])
scenemanager_sample_env.AppendUnique(CXXFLAGS=['--coverage'])
+
+if 'gcc' == lib_env.get('CC') and target_os not in ['android']:
+ scenemanager_sample_env.AppendUnique(CFLAGS=['-pthread'])
+ scenemanager_sample_env.AppendUnique(LIBS=['pthread'])
####################################################################
# Source files and Targets
######################################################################