summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-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')