summaryrefslogtreecommitdiff
blob: 5d4cf9c00b4cc175475b03cce8359815e76decbd (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
--- a/SConstruct
+++ b/SConstruct
@@ -22,14 +22,24 @@
 
 
 
-import os,glob
+import os,glob,SCons.Util
 
 
+# http://dev.gentoo.org/~vapier/scons-blows.txt
 
 # create build environment
 
+env = Environment()
+env.SConsignFile()
 env = Environment(tools = ['default', 'pouetChess'], toolpath = ['.'])
-env.AppendUnique(CXXFLAGS = ['-Wall'])
+env['CC'] = os.environ['CC']
+env['CXX'] = os.environ['CXX']
+if os.environ.has_key('CFLAGS'):
+	env['CCFLAGS'] = SCons.Util.CLVar(os.environ['CFLAGS'])
+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'])
 
 # gather a list of source files
 SOURCES =  glob.glob('src/*.cpp')