Adding changes in octhread related to Process Event
[platform/upstream/iotivity.git] / build_common / thread.scons
1 # Factorize pthread configurations in single file
2 import os
3
4 Import('env')
5
6 thread_env = env.Clone()
7 target_os = thread_env.get('TARGET_OS')
8
9 # Export flags once for all
10 compiler = thread_env.get('CC')
11 if 'gcc' in compiler:
12     thread_env.AppendUnique(CFLAGS = ['-Wall'])
13     if target_os not in ['android','tizenrt']:
14         thread_env.AppendUnique(CFLAGS = ['-pthread'])
15         thread_env.AppendUnique(LIBS = ['pthread'])
16
17 Return('thread_env')