# Factorize pthread configurations in single file import os Import('env') thread_env = env.Clone() target_os = thread_env.get('TARGET_OS') # Export flags once for all compiler = thread_env.get('CC') if 'gcc' in compiler: thread_env.AppendUnique(CFLAGS = ['-Wall']) if target_os not in ['android','tizenrt']: thread_env.AppendUnique(CFLAGS = ['-pthread']) thread_env.AppendUnique(LIBS = ['pthread']) Return('thread_env')