--- SConstruct.orig 2015-05-21 18:03:21 UTC +++ SConstruct @@ -60,7 +60,7 @@ elif (os.name=="nt"): if (os.getenv("VSINSTALLDIR")==None): custom_tools=['mingw'] -env_base=Environment(tools=custom_tools,ENV = {'PATH' : os.environ['PATH']}); +env_base=Environment(tools=custom_tools,ENV = os.environ); #env_base=Environment(tools=custom_tools); env_base.global_defaults=global_defaults env_base.android_source_modules=[] @@ -115,7 +115,8 @@ opts.Add('etc1','etc1 Texture compressio opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') opts.Add('musepack','Musepack Audio (yes/no)','yes') -opts.Add("CXX", "Compiler"); +opts.Add("CC", "C Compiler") +opts.Add("CXX", "C++ Compiler"); opts.Add("CCFLAGS", "Custom flags for the C++ compiler"); opts.Add("CFLAGS", "Custom flags for the C compiler"); opts.Add("LINKFLAGS", "Custom flags for the linker"); @@ -202,15 +203,17 @@ if selected_platform in platform_list: if env["extra_suffix"] != '' : env.extra_suffix += '.'+env["extra_suffix"] - CCFLAGS = env.get('CCFLAGS', '') - env['CCFLAGS'] = '' - - env.Append(CCFLAGS=string.split(str(CCFLAGS))) + env['CC'] = os.environ['CC'] + + env['CXX'] = os.environ['CXX'] - CFLAGS = env.get('CFLAGS', '') - env['CFLAGS'] = '' + CFLAGS = os.environ['CFLAGS'] + env['CFLAGS'] = [] + env.Append(CFLAGS=string.split(CFLAGS)) - env.Append(CFLAGS=string.split(str(CFLAGS))) + CCFLAGS = os.environ['CXXFLAGS'] + env['CCFLAGS'] = [] + env.Append(CCFLAGS=string.split(CCFLAGS)) LINKFLAGS = env.get('LINKFLAGS', '') env['LINKFLAGS'] = ''