summaryrefslogtreecommitdiff
blob: 96477c6fce3ad450c1f8621cbc87e64a1e76e236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- SConstruct
+++ SConstruct
@@ -1,8 +1,7 @@
 # -*- python -*-
 
-if True:
+if False:
     env = Environment(CPPFLAGS=['-g', '-O2', '-Wall', '-ansi', '-pedantic'])
-else:
     env = Environment(CXXFLAGS= [ "-O3", "-g3",
                                   "-ansi",
                                   "-pedantic",
@@ -18,6 +17,17 @@
                                   "-Winit-self", # only works with >= -O1
                                   "-Wno-unused-parameter",
                                   ])
+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']: