diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-08 19:27:39 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-08 19:27:39 +0100 |
commit | acacdcd8521c29f1a2c893d4bf97445cb22a9e75 (patch) | |
tree | 0f3f259bdafe1417fc8bd3aa307d89c730faee55 /SConstruct | |
parent | 7561c42ec666231063a3dc65d736fc3d69aae265 (diff) |
Added release build option.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,7 @@ import os +AddOption('--release', action = 'store_true') + env = Environment() conf = Configure(env) @@ -19,7 +21,13 @@ if 'CCFLAGS' in os.environ: if 'LINKFLAGS' in os.environ: env.Append(LINKFLAGS = os.environ['LINKFLAGS'].split()) -env.Append(CCFLAGS = ['-std=gnu99', '-g', '-Wall']) +env.Append(CCFLAGS = ['-std=gnu99']) + +if GetOption('release'): + env.Append(CCFLAGS = ['-O2']) +else: + env.Append(CCFLAGS = ['-g', '-Wall']) + env.Append(LINKFLAGS = ['-Wl,--export-dynamic']) env.ParseConfig('pkg-config --cflags --libs glib-2.0') env.ParseConfig('pkg-config --cflags --libs sqlite3') |