diff options
-rw-r--r-- | SConstruct | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,4 +1,4 @@ -import os +AddOption('--release', action = 'store_true') env = Environment() @@ -11,12 +11,10 @@ env = conf.Finish() env.Append(CCFLAGS = ['-std=c99', '-D_GNU_SOURCE', '-pthread']) -if 'DEBUG' in os.environ: - print 'Debug build' - env.Append(CCFLAGS = ['-g']) -else: - print 'Release build' +if GetOption('release'): env.Append(CCFLAGS = ['-O2']) +else: + env.Append(CCFLAGS = ['-g']) env.Append(LINKFLAGS = ['-pthread']) env.ParseConfig('pkg-config --cflags --libs libconfig') |