summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct5
1 files changed, 5 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 1e7e66e..1a49017 100644
--- a/SConstruct
+++ b/SConstruct
@@ -7,6 +7,7 @@ env = Environment(
engine = Glob('engine/*.cpp')
AddOption('--release', action = 'store_true')
+AddOption('--profiling', action = 'store_true')
if env['PLATFORM'] == 'darwin':
env.Append(CPPFLAGS = '')
@@ -24,6 +25,10 @@ else:
if not GetOption('release'):
env.Append(CPPFLAGS = ['-Wall', '-g'])
+if GetOption('profiling'):
+ env.Append(CPPFLAGS = ['-pg'])
+ env.Append(LINKFLAGS = ['-pg'])
+
env.Program('foo', ['main.cpp'] + engine)
# vim: syn=python