Mercurial > fife-parpg
comparison SConstruct @ 409:47eca3c3d59d
Fixed a small bug where CXXFLAGS was not being honored.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 31 Jan 2010 05:02:24 +0000 |
parents | 81641655bc38 |
children | efa51189ffc3 |
comparison
equal
deleted
inserted
replaced
408:219b8036708c | 409:47eca3c3d59d |
---|---|
34 vars = Variables() | 34 vars = Variables() |
35 vars.Add(PathVariable('DESTDIR', | 35 vars.Add(PathVariable('DESTDIR', |
36 'Destination directory (prepended to prefix)', | 36 'Destination directory (prepended to prefix)', |
37 None, | 37 None, |
38 PathVariable.PathAccept )) | 38 PathVariable.PathAccept )) |
39 #vars.Add('CXXFLAGS', "") | |
39 | 40 |
40 #propagate the invoking users complete external environment | 41 #propagate the invoking users complete external environment |
41 env = Environment(variables = vars, | 42 env = Environment(variables = vars, |
42 ENV = os.environ, | 43 ENV = os.environ, |
43 DESTDIR = '${DESTDIR}') | 44 DESTDIR = '${DESTDIR}') |
245 usercxxflags = Split(ARGUMENTS.get('CXXFLAGS')) | 246 usercxxflags = Split(ARGUMENTS.get('CXXFLAGS')) |
246 haveusercxxflags = True | 247 haveusercxxflags = True |
247 | 248 |
248 if debug: | 249 if debug: |
249 if haveusercxxflags: | 250 if haveusercxxflags: |
250 env.AppendUnique(usercxxflags) | 251 env.AppendUnique(CXXFLAGS=usercxxflags) |
251 else: | 252 else: |
252 env.AppendUnique(CXXFLAGS=['-O0', '-Wall', '-Wno-unused']) | 253 env.AppendUnique(CXXFLAGS=['-O0', '-Wall', '-Wno-unused']) |
253 | 254 |
254 env.AppendUnique(CXXFLAGS=['-ggdb', '-D_DEBUG']) | 255 env.AppendUnique(CXXFLAGS=['-ggdb', '-D_DEBUG']) |
255 engine_var_dir = os.path.join('build','engine','debug') | 256 engine_var_dir = os.path.join('build','engine','debug') |
256 tests_var_dir = os.path.join('build','tests','debug') | 257 tests_var_dir = os.path.join('build','tests','debug') |
257 print "Building DEBUG binaries..." | 258 print "Building DEBUG binaries..." |
258 else: | 259 else: |
259 if haveusercxxflags: | 260 if haveusercxxflags: |
260 env.AppendUnique(usercxxflags) | 261 env.AppendUnique(CXXFLAGS=usercxxflags) |
261 else: | 262 else: |
262 env.AppendUnique(CXXFLAGS=['-O2', '-Wall', '-Wno-unused']) | 263 env.AppendUnique(CXXFLAGS=['-O2', '-Wall', '-Wno-unused']) |
263 | 264 |
264 engine_var_dir = os.path.join('build','engine','release') | 265 engine_var_dir = os.path.join('build','engine','release') |
265 tests_var_dir = os.path.join('build','tests','release') | 266 tests_var_dir = os.path.join('build','tests','release') |