env = Environment(variables = help_vars, tools = ['default', 'textfile'],
TARGET_ARCH = target_arch, TARGET_OS = target_os,
PREFIX = GetOption('prefix'),
- LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR') #for 64bit build
+ LIB_INSTALL_DIR = ARGUMENTS.get('LIB_INSTALL_DIR'), #for 64bit build
+ CC = os.environ.get('CC') or 'gcc',
+ CXX = os.environ.get('CXX') or 'g++'
)
Help(help_vars.GenerateHelpText(env))
# Export flags once for all
compiler = thread_env.get('CC')
-if 'gcc' in compiler:
+if 'gcc' in compiler or 'clang' in compiler:
thread_env.AppendUnique(CFLAGS = ['-Wall'])
if target_os not in ['android','tizenrt']:
thread_env.AppendUnique(CFLAGS = ['-pthread'])