Add tests that show the timing differences between the Glib/mm based timeouts
[ardour.git] / libs / pbd / wscript
index 4ac2960f11fd797d2ebbc0012f15d26b76b68c1c..cb55437ae43078de643a3bb16a337dc0f6dfa8c2 100644 (file)
@@ -34,10 +34,11 @@ libpbd_sources = [
     'boost_debug.cc',
     'cartesian.cc',
     'command.cc',
+    'configuration_variable.cc',
     'convert.cc',
     'controllable.cc',
     'controllable_descriptor.cc',
-    'clear_dir.cc',
+    'crossthread.cc',
     'cpus.cc',
     'debug.cc',
     'enumwriter.cc',
@@ -46,7 +47,6 @@ libpbd_sources = [
     'epa.cc',
     'error.cc',
     'ffs.cc',
-    'file_manager.cc',
     'file_utils.cc',
     'fpu.cc',
     'glib_semaphore.cc',
@@ -54,10 +54,10 @@ libpbd_sources = [
     'locale_guard.cc',
     'localtime_r.cc',
     'malign.cc',
+    'md5.cc',
     'mountpoint.cc',
     'openuri.cc',
     'pathexpand.cc',
-    'pathscanner.cc',
     'pbd.cc',
     'pool.cc',
     'property_list.cc',
@@ -68,7 +68,6 @@ libpbd_sources = [
     'semutils.cc',
     'shortpath.cc',
     'signals.cc',
-    'sndfile_manager.cc',
     'stacktrace.cc',
     'stateful_diff_command.cc',
     'stateful.cc',
@@ -76,6 +75,8 @@ libpbd_sources = [
     'strsplit.cc',
     'system_exec.cc',
     'textreceiver.cc',
+    'timer.cc',
+    'timing.cc',
     'transmitter.cc',
     'undo.cc',
     'uuid.cc',
@@ -106,19 +107,22 @@ def configure(conf):
     # Boost headers
     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
+    if Options.options.dist_target == 'mingw':
+        conf.check(compiler='cxx',
+                   lib='ole32',
+                   mandatory=True,
+                   uselib_store='OLE')
 
 def build(bld):
-    
+
     # Make signals_generated.h using signals.py
     bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h')
 
     # Library
     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
-        print('BUILD SHARED LIB')
         obj              = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources)
         obj.defines = [ 'LIBPBD_DLL_EXPORTS=1' ]
     else:
-        print('BUILD STATIC LIB')
         obj              = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
         obj.cxxflags     = [ '-fPIC' ]
         obj.cflags     = [ '-fPIC' ]
@@ -127,9 +131,6 @@ def build(bld):
     if bld.is_defined('DEBUG_RT_ALLOC'):
         obj.source += 'debug_rt_alloc.c'
 
-    if bld.env['build_target'] != 'mingw':
-        obj.source += [ 'crossthread.cc' ]
-
     obj.export_includes = ['.']
     obj.includes     = ['.']
     obj.name         = 'libpbd'
@@ -141,13 +142,14 @@ def build(bld):
             obj.source += [ 'cocoa_open_uri.mm' ]
         obj.uselib += ' OSX'
     obj.vnum         = LIBPBD_LIB_VERSION
-    obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
-    obj.defines     += [ 'PACKAGE="' + I18N_PACKAGE + '"',
-                         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"' 
-                         ]
-    
+    obj.install_path = bld.env['LIBDIR']
+    obj.defines     += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
+
     if bld.env['build_target'] == 'x86_64':
         obj.defines += [ 'USE_X86_64_ASM' ]
+    if bld.env['build_target'] == 'mingw':
+        obj.source += [ 'windows_special_dirs.cc' ]
+        obj.uselib += ' OLE'
 
     if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
         # Unit tests
@@ -158,6 +160,7 @@ def build(bld):
                 test/mutex_test.cc
                 test/scalar_properties.cc
                 test/signals_test.cc
+                test/timer_test.cc
                 test/convert_test.cc
                 test/filesystem_test.cc
                 test/test_common.cc
@@ -167,8 +170,9 @@ def build(bld):
         testobj.uselib       = 'CPPUNIT XML SNDFILE'
         testobj.use          = 'libpbd'
         testobj.name         = 'libpbd-tests'
+        testobj.defines      = [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
         if sys.platform != 'darwin' and bld.env['build_target'] != 'mingw':
             testobj.linkflags    = ['-lrt']
-
+            
 def shutdown():
     autowaf.shutdown()