diff options
-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') |