diff options
author | Alan Hourihane <alanh@vmware.com> | 2010-01-26 19:14:16 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@vmware.com> | 2010-01-26 19:14:50 +0000 |
commit | 6544be622363674430f70ca262629334d25b350a (patch) | |
tree | 6572c44e84d280078e04e54b440873076c5e199f /SConstruct | |
parent | 1019f0de1170f627e8e9ce7b449f7a76d89c6742 (diff) |
Allow the environment to override certain flags.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index ff06b9b5921..0770fe43e7f 100644 --- a/SConstruct +++ b/SConstruct @@ -59,6 +59,17 @@ env = Environment( ENV = os.environ, ) +if os.environ.has_key('CC'): + env['CC'] = os.environ['CC'] +if os.environ.has_key('CFLAGS'): + env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS']) +if os.environ.has_key('CXX'): + env['CXX'] = os.environ['CXX'] +if os.environ.has_key('CXXFLAGS'): + env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS']) +if os.environ.has_key('LDFLAGS'): + env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS']) + Help(opts.GenerateHelpText(env)) # replicate options values in local variables |