stub file to enable nightly builds
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 4319de317b05f3c9b477a47db52dd93e5ab20603..ecd3d745231b216ebe5330c1844ffb9369923892 100644 (file)
--- a/wscript
+++ b/wscript
@@ -35,13 +35,15 @@ Context.Context.is_tracks_build = is_tracks_build
 compiler_flags_dictionaries= {
     'gcc' : {
         # Flags required when building a debug build
-        'debuggable' : [ '-O0', '-g' ],
+        'debuggable' : [ '-g' ],
         # Flags required for the linker (if any) when building a debug build
         'linker-debuggable' : '',
         # Flags required when building a non-debug optimized build
         'nondebuggable' : '-DNDEBUG',
-        # Flags required to enable profiling at runtime
-        'profile' : '-pg',
+        # Flags required to enable profiling at runtime with optimized builds
+        'profile' : [ '-fno-omit-frame-pointer' ],
+        # Flags required to enable gprofile profiling
+        'gprofile' : '-pg',
         # Flags required to disable warnings about unused arguments to function calls
         'silence-unused-arguments' : '',
         # Flags required to use SSE unit for general math
@@ -89,7 +91,7 @@ compiler_flags_dictionaries= {
         'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
         'linker-debuggable' : ['/DEBUG', '/INCREMENTAL' ],
         'nondebuggable' : ['/DNDEBUG', '/Ob1', '/MD', '/Gd', '/EHsc'],
-        'profile' : '',
+        'profile' : '/Oy-',
         'sse' : '/arch:SSE',
         'silence-unused-arguments' : '',
         'sse' : '',
@@ -332,7 +334,7 @@ int main() { return 0; }''',
         linker_flags.append('-fsanitize=address')
 
     if opt.gprofile:
-        debug_flags = [ flags_dict['profile'] ]
+        debug_flags = [ flags_dict['gprofile'] ]
 
     # OSX
     if platform == 'darwin':
@@ -545,6 +547,9 @@ int main() { return 0; }''',
     if opt.debug_symbols:
         optimization_flags += flags_dict['debuggable']
 
+    if opt.profile:
+        optimization_flags += flags_dict['profile']
+
     if opt.stl_debug:
         cxx_flags.append("-D_GLIBCXX_DEBUG")
 
@@ -643,9 +648,11 @@ def options(opt):
     opt.add_option('--no-fpu-optimization', action='store_false', dest='fpu_optimization')
     opt.add_option('--exports-hidden', action='store_true', default=False, dest='exports_hidden')
     opt.add_option('--freedesktop', action='store_true', default=False, dest='freedesktop',
-                    help='Install MIME type, icons and .desktop file as per freedesktop.org standards')
+                    help='Build MIME type and .desktop files as per freedesktop.org standards (will be placed in build/gtk2_ardour)')
     opt.add_option('--freebie', action='store_true', default=False, dest='freebie',
                     help='Build a version suitable for distribution as a zero-cost binary')
+    opt.add_option('--profile', action='store_true', default=False, dest='profile',
+                    help='Compile for use with profiling tools requiring a frame pointer')
     opt.add_option('--gprofile', action='store_true', default=False, dest='gprofile',
                     help='Compile for use with gprofile')
     opt.add_option('--libjack', type='string', default="auto", dest='libjack_link',
@@ -904,7 +911,7 @@ def configure(conf):
 
     have_rf64_riff_support = conf.check_cc(fragment = '''
 #include <sndfile.h>
-int main () { int x = SFC_AUTO_DOWNGRADE_RF64; return 0; }
+int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
 ''',
                                            features  = 'c',
                                            mandatory = False,
@@ -983,6 +990,8 @@ int main () { int x = SFC_AUTO_DOWNGRADE_RF64; return 0; }
         conf.env['PHONE_HOME'] = True
     if opts.fpu_optimization:
         conf.env['FPU_OPTIMIZATION'] = True
+    if opts.freedesktop:
+        conf.env['FREEDESKTOP'] = True
     if opts.nls:
         conf.define('ENABLE_NLS', 1)
         conf.env['ENABLE_NLS'] = True