summaryrefslogtreecommitdiff
blob: e33a5f8e64337a8392fc43c3ff7bb312430f820f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- SConstruct
+++ SConstruct
@@ -1,6 +1,16 @@
 # -*- python -*-
 
-env = Environment(CPPFLAGS=['-g', '-O2', '-Wall', '-ansi', '-pedantic'])
+import os
+import SCons.Util
+
+env = Environment(CPPFLAGS=['-Wall', '-ansi', '-pedantic'])
+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'])
+
 conf = Configure(env)
 
 if not conf.env['CXX']: