summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-08 19:27:39 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-08 19:27:39 +0100
commitacacdcd8521c29f1a2c893d4bf97445cb22a9e75 (patch)
tree0f3f259bdafe1417fc8bd3aa307d89c730faee55
parent7561c42ec666231063a3dc65d736fc3d69aae265 (diff)
Added release build option.
-rw-r--r--SConstruct10
1 files changed, 9 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 3178382..f9d3986 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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')