env,
BoolVariable('final', 'Build final (optimized) build', False),
BoolVariable('debug', 'Link in debug symbols', False),
+ BoolVariable('profile', 'compile and link with the profiling enabled option', False),
)
# Set nice default options
env.Append(
- CXXFLAGS = [ '-Wall', '-Woverloaded-virtual' ],
+ CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', "${profile and '-pg' or None}" ],
CXXFLAGS_final = [ '-O3' ],
CXXFLAGS_normal = [ '-O2', '-g' ],
CXXFLAGS_debug = [ '-O0', '-g' ],
+ LINKFLAGS = [ "${profile and '-pg' or None}" ],
LINKFLAGS_normal = [ '-Wl,-S' ],
LINKFLAGS_debug = [ '-g' ],
)