part-way through getting the audioengine changes to compile
[ardour.git] / libs / ardour / wscript
1 1#!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options
4 import os
5 import re
6 import subprocess
7
8 # default state file version for this build
9 CURRENT_SESSION_FILE_VERSION = 3001
10
11 # Variables for 'waf dist'
12 APPNAME = 'libardour3'
13 I18N_PACKAGE = 'ardour3'
14
15 # Mandatory variables
16 top = '.'
17 out = 'build'
18
19 path_prefix = 'libs/ardour/'
20
21 libardour_sources = [
22         'amp.cc',
23         'analyser.cc',
24         'audio_buffer.cc',
25         'audio_diskstream.cc',
26         'audio_library.cc',
27         'audio_playlist.cc',
28         'audio_playlist_importer.cc',
29         'audio_playlist_source.cc',
30         'audio_port.cc',
31         'audio_region_importer.cc',
32         'audio_track.cc',
33         'audio_track_importer.cc',
34         'audioanalyser.cc',
35         'audioengine.cc',
36         'audiofile_tagger.cc',
37         'audiofilesource.cc',
38         'audioregion.cc',
39         'audiosource.cc',
40         'auditioner.cc',
41         'automatable.cc',
42         'automation.cc',
43         'automation_control.cc',
44         'automation_list.cc',
45         'automation_watch.cc',
46         'beats_frames_converter.cc',
47         'broadcast_info.cc',
48         'buffer.cc',
49         'buffer_manager.cc',
50         'buffer_set.cc',
51         'bundle.cc',
52         'butler.cc',
53         'capturing_processor.cc',
54         'chan_count.cc',
55         'chan_mapping.cc',
56         'configuration.cc',
57         'config_text.cc',
58         'control_protocol_manager.cc',
59         'control_protocol_search_path.cc',
60         'cycle_timer.cc',
61         'data_type.cc',
62         'default_click.cc',
63         'debug.cc',
64         'delivery.cc',
65         'directory_names.cc',
66         'diskstream.cc',
67         'element_import_handler.cc',
68         'element_importer.cc',
69         'enums.cc',
70         'event_type_map.cc',
71         'export_channel.cc',
72         'export_channel_configuration.cc',
73         'export_failed.cc',
74         'export_filename.cc',
75         'export_format_base.cc',
76         'export_format_manager.cc',
77         'export_format_specification.cc',
78         'export_formats.cc',
79         'export_formats_search_path.cc',
80         'export_graph_builder.cc',
81         'export_handler.cc',
82         'export_preset.cc',
83         'export_profile_manager.cc',
84         'export_status.cc',
85         'export_timespan.cc',
86         'file_source.cc',
87         'filename_extensions.cc',
88         'filesystem_paths.cc',
89         'filter.cc',
90         'find_session.cc',
91         'globals.cc',
92         'graph.cc',
93         'graphnode.cc',
94         'iec1ppmdsp.cc',
95         'iec2ppmdsp.cc',
96         'import.cc',
97         'instrument_info.cc',
98         'internal_return.cc',
99         'internal_send.cc',
100         'interpolation.cc',
101         'io.cc',
102         'io_processor.cc',
103         'jack_slave.cc',
104         'kmeterdsp.cc',
105         'ladspa_plugin.cc',
106         'location.cc',
107         'location_importer.cc',
108         'ltc_slave.cc',
109         'lv2_bundled_search_path.cc',
110         'meter.cc',
111         'midi_automation_list_binder.cc',
112         'midi_buffer.cc',
113         'midi_clock_slave.cc',
114         'midi_diskstream.cc',
115         'midi_model.cc',
116         'midi_patch_manager.cc',
117         'midi_patch_search_path.cc',
118         'midi_playlist.cc',
119         'midi_playlist_source.cc',
120         'midi_port.cc',
121         'midi_region.cc',
122         'midi_ring_buffer.cc',
123         'midi_source.cc',
124         'midi_state_tracker.cc',
125         'midi_stretch.cc',
126         'midi_track.cc',
127         'midi_ui.cc',
128         'mix.cc',
129         'monitor_processor.cc',
130         'mtc_slave.cc',
131         'mtdm.cc',
132         'mute_master.cc',
133         'onset_detector.cc',
134         'operations.cc',
135         'pan_controllable.cc',
136         'pannable.cc',
137         'panner.cc',
138         'panner_manager.cc',
139         'panner_search_path.cc',
140         'panner_shell.cc',
141         'pcm_utils.cc',
142         'pi_controller.cc',
143         'playlist.cc',
144         'playlist_factory.cc',
145         'playlist_source.cc',
146         'plugin.cc',
147         'plugin_insert.cc',
148         'plugin_manager.cc',
149         'port.cc',
150         'port_insert.cc',
151         'port_set.cc',
152         'process_thread.cc',
153         'processor.cc',
154         'progress.cc',
155         'quantize.cc',
156         'rc_configuration.cc',
157         'recent_sessions.cc',
158         'region_factory.cc',
159         'resampled_source.cc',
160         'region.cc',
161         'return.cc',
162         'reverse.cc',
163         'route.cc',
164         'route_graph.cc',
165         'route_group.cc',
166         'route_group_member.cc',
167         'rb_effect.cc',
168         'send.cc',
169         'session.cc',
170         'session_butler.cc',
171         'session_click.cc',
172         'session_command.cc',
173         'session_configuration.cc',
174         'session_directory.cc',
175         'session_events.cc',
176         'session_export.cc',
177         'session_handle.cc',
178         'session_ltc.cc',
179         'session_metadata.cc',
180         'session_midi.cc',
181         'session_object.cc',
182         'session_playlists.cc',
183         'session_process.cc',
184         'session_rtevents.cc',
185         'session_state.cc',
186         'session_state_utils.cc',
187         'session_time.cc',
188         'session_transport.cc',
189         'slave.cc',
190         'smf_source.cc',
191         'sndfile_helpers.cc',
192         'sndfileimportable.cc',
193         'sndfilesource.cc',
194         'source.cc',
195         'source_factory.cc',
196         'speakers.cc',
197         'strip_silence.cc',
198         'revision.cc',
199         'tape_file_matcher.cc',
200         'template_utils.cc',
201         'tempo.cc',
202         'tempo_map_importer.cc',
203         'thread_buffers.cc',
204         'ticker.cc',
205         'track.cc',
206         'transient_detector.cc',
207         'unknown_processor.cc',
208         'user_bundle.cc',
209         'utils.cc',
210         'version.cc',
211         'vumeterdsp.cc',
212         'worker.cc'
213 ]
214
215 def flac_supported():
216     cmd = subprocess.Popen ("sndfile-info testfile.flac",
217                             stdout = subprocess.PIPE,
218                             stderr = subprocess.STDOUT, shell = True)
219     out = cmd.communicate()[0].decode('utf-8');
220     return re.search ('unknown format', out) == None
221
222 def ogg_supported():
223     cmd = subprocess.Popen ("sndfile-info testfile.ogg",
224                             stdout = subprocess.PIPE,
225                             stderr = subprocess.STDOUT, shell = True)
226     out = cmd.communicate()[0].decode('utf-8');
227     return re.search ('unknown format', out) == None
228
229 def options(opt):
230     autowaf.set_options(opt)
231
232 def configure(conf):
233     conf.load('compiler_cxx')
234     conf.load('gas')
235     # we don't use hard-coded micro versions with ardour, so hard code it to zero
236     autowaf.build_version_files(
237         path_prefix + 'ardour/version.h',
238         path_prefix + 'version.cc',
239         'libardour3', conf.env['MAJOR'], conf.env['MINOR'], 0)
240     autowaf.configure(conf)
241     autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO',
242                       atleast_version='0.3.2')
243     autowaf.check_pkg(conf, 'jack', uselib_store='JACK',
244                       atleast_version='0.118.2')
245     autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
246     autowaf.check_pkg(conf, 'lrdf', uselib_store='LRDF',
247                       atleast_version='0.4.0')
248     autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE',
249                       atleast_version='0.1.0')
250     autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP',
251                       atleast_version='2.0')
252     if Options.options.lv2:
253         autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
254                           atleast_version='1.0.0', mandatory=True)
255         autowaf.check_pkg(conf, 'lv2', uselib_store='NEW_LV2',
256                           atleast_version='1.0.15', mandatory=False)
257         autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
258                           atleast_version='0.14.0', mandatory=True)
259         autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
260                           atleast_version='0.8.0', mandatory=True)
261         autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM',
262                           atleast_version='0.2.0', mandatory=True)
263         autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
264                           atleast_version='0.14.0', mandatory=True)
265         autowaf.check_pkg(conf, 'lilv-0', uselib_store='NEW_LILV',
266                           atleast_version='0.15.0', mandatory=False)
267         autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
268                           atleast_version='0.6.0', mandatory=False)
269         conf.define ('LV2_SUPPORT', 1)
270
271 #    autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
272 #                      mandatory=False)
273     autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT',
274                       atleast_version='1.12.0', mandatory=False)
275     autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
276     autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
277                       atleast_version='1.2.1')
278     autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL',
279                       atleast_version='7.0.0')
280
281     # we don't try to detect this, since its part of our source tree
282
283     conf.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
284     conf.define('USE_RUBBERBAND', 1)  # controls whether we actually use it
285
286     conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
287
288     conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H',mandatory=False)
289     conf.check(header_name='sys/statvfs.h', define_name='HAVE_SYS_STATVFS_H',mandatory=False)
290
291     conf.check(header_name='jack/session.h', uselib = [ 'JACK' ],
292                define_name='HAVE_JACK_SESSION')
293
294     conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False)
295
296     conf.check_cc(fragment = '''
297 #include <jack/jack.h>
298 void callback(jack_status_t code, const char* reason, void* arg) { return; }
299 int main(int argc, char **argv) {
300     jack_client_t* c;
301     jack_on_info_shutdown(c, callback, (void*) 0);
302     return 0;
303 }''',
304                   uselib= [ 'JACK' ],
305                   msg = 'Checking for jack_on_info_shutdown',
306                   define_name = 'HAVE_JACK_ON_INFO_SHUTDOWN',
307                   okmsg = 'present')
308
309     missing_jack_message = 'missing - a version of JACK that supports jack_port_set_latency_range() is required to compile Ardour3.'
310
311     conf.check_cc(fragment = '''
312 #include <jack/jack.h>
313 int main(int argc, char **argv) {
314     jack_port_t* p;
315     jack_latency_range_t r;
316     jack_port_set_latency_range(p, JackCaptureLatency, &r);
317     return 0;
318 }''',
319                   uselib = [ 'JACK' ],
320                   msg = 'Checking for new JACK latency API',
321                   okmsg = 'present',
322                   mandatory = True,
323                   errmsg = missing_jack_message)
324
325     conf.check_cc(fragment = '''
326 #include <jack/jack.h>
327 int main(int argc, char **argv) {
328    jack_port_type_get_buffer_size((jack_client_t*)0, "");
329    return 0;
330 }''',
331                   uselib = [ 'JACK' ],
332                   msg = 'Checking for new jack_port_type_get_buffer_size',
333                   okmsg = 'present',
334                   mandatory = True,
335                   errmsg = missing_jack_message)
336
337     conf.check_cc(fragment = '''
338 #include <jack/transport.h>
339 int main(int argc, char** argv) {
340   jack_position_t pos;
341   pos.valid & JackVideoFrameOffset;
342   return 0;
343 }''',
344                   uselib= [ 'JACK' ],
345                   msg = 'Checking for JackVideoFrameOffset',
346                   define_name = 'HAVE_JACK_VIDEO_SUPPORT',
347                   mandatory = False,
348                   okmsg = 'present')
349
350     if flac_supported():
351         conf.define ('HAVE_FLAC', 1)
352     if ogg_supported():
353         conf.define ('HAVE_OGG', 1)
354
355     conf.write_config_header('libardour-config.h', remove=False)
356
357     # Boost headers
358     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
359     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
360     autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp')
361     autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp')
362
363
364 def build(bld):
365     # Library version (UNIX style major, minor, micro)
366     # major increment <=> incompatible changes
367     # minor increment <=> compatible changes (additions)
368     # micro increment <=> no interface changes
369     LIBARDOUR_LIB_VERSION = "3.0.0."
370
371     # Library
372     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
373         obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources)
374     else:
375         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
376         obj.cxxflags     = [ '-fPIC' ]
377         obj.cflags       = [ '-fPIC' ]
378
379     obj.export_includes = ['.']
380     obj.includes     = ['.', '../surfaces/control_protocol', '..']
381     obj.name         = 'ardour'
382     obj.target       = 'ardour'
383     obj.uselib       = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
384                         'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS',
385                         'OSX','BOOST','CURL','DL']
386     obj.use          = ['libpbd','libmidipp','libevoral','libvamphost',
387                         'libvampplugin','libtaglib','librubberband',
388                         'libaudiographer','libltc']
389     obj.vnum         = LIBARDOUR_LIB_VERSION
390     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
391     obj.defines      = [
392         'PACKAGE="' + I18N_PACKAGE + '"',
393         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
394         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
395         'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
396         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"',
397         'EVORAL_MIDI_XML=1' 
398         ]
399
400     #obj.source += ' st_stretch.cc st_pitch.cc '
401     #obj.uselib += ' SOUNDTOUCH '
402     #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
403
404     if bld.is_defined('HAVE_LILV') :
405         obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc'] 
406         obj.uselib += ['LILV']
407         if bld.is_defined('HAVE_SUIL'):
408             obj.uselib += ['SUIL']
409
410     if bld.is_defined('WINDOWS_VST_SUPPORT'):
411         obj.source += [ 'windows_vst_plugin.cc']
412         obj.includes += [ '../fst' ]
413         obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
414
415     if bld.is_defined('LXVST_SUPPORT'):
416         obj.source += [ 'lxvst_plugin.cc', 'linux_vst_support.cc', 'linux_vst_info_file.cc' ]
417         obj.defines += [ 'LXVST_SUPPORT' ]
418
419     if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
420         obj.source += [ 'session_vst.cc', 'vst_plugin.cc' ]
421
422     if bld.is_defined('HAVE_COREAUDIO'):
423         obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
424         obj.use    += ['libappleutility']
425
426     if bld.is_defined('AUDIOUNIT_SUPPORT'):
427         obj.source += [ 'audio_unit.cc' ]
428
429     if Options.options.fpu_optimization:
430         if (bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686'):
431             obj.source += [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
432         elif bld.env['build_target'] == 'x86_64':
433             obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
434
435     # the JACK audio backend
436
437     obj = bld.shlib (features = 'c cxx cshlib cxxshlib', source='jack_audiobackend.cc')
438     obj.cxxflags = [ '-fPIC' ]
439     obj.name     = 'jack_audiobackend'
440     obj.target   = 'jack_audiobackend'
441     obj.uselib   = [ 'JACK' ]
442     obj.use      = [ 'ardour' ]
443     obj.vnum     = '1.0.0'
444     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
445     obj.includes = [ '.' ]
446     obj.defines = [
447         'PACKAGE="' + I18N_PACKAGE + '"',
448         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
449         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
450         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"',
451         ]
452     
453
454     # i18n
455     if bld.is_defined('ENABLE_NLS'):
456         mo_files = bld.path.ant_glob('po/*.mo')
457         for mo in mo_files:
458             lang = os.path.basename(mo.srcpath()).replace('.mo', '')
459             bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
460                                         lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
461                            mo)
462
463     if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
464         # Unit tests
465         # only build these common sources once
466         testcommon              = bld(features = 'cxx')
467         testcommon.includes     = obj.includes + ['test', '../pbd', '..']
468         testcommon.source       = ['test/test_globals.cc', 'test/testrunner.cc', 'test/test_needing_session.cc',
469                                    'test/test_common.cc', 'test/dummy_lxvst.cc', 'test/audio_region_test.cc', 'test/test_util.cc']
470         testcommon.uselib       = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
471                                    'SAMPLERATE','XML','LRDF','COREAUDIO']
472         testcommon.use          = ['libpbd','libmidipp','libevoral','libvamphost',
473                                    'libvampplugin','libtaglib','librubberband',
474                                    'libaudiographer','libltc','ardour']
475         testcommon.defines      = [
476             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
477             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
478             'LOCALEDIR="' + os.path.join(
479                 os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
480             'VAMP_DIR="' + os.path.join(
481                 os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
482             ]
483         testcommon.name         = 'testcommon'
484
485         if bld.env['FPU_OPTIMIZATION']:
486             testcommon.source += [ 'sse_functions_xmm.cc' ]
487             if (bld.env['build_target'] == 'i386'
488                 or bld.env['build_target'] == 'i686'):
489                 testcommon.source += [ 'sse_functions.s' ]
490             elif bld.env['build_target'] == 'x86_64':
491                 testcommon.source += [ 'sse_functions_64bit.s' ]
492
493         if bld.env['SINGLE_TESTS']:
494             create_ardour_test_program(bld, obj.includes, 'automation_list_property_test', 'test_automation_list_property', ['test/automation_list_property_test.cc'])
495             create_ardour_test_program(bld, obj.includes, 'bbt', 'test_bbt', ['test/bbt_test.cc'])
496             create_ardour_test_program(bld, obj.includes, 'tempo', 'test_tempo', ['test/tempo_test.cc'])
497             create_ardour_test_program(bld, obj.includes, 'interpolation', 'test_interpolation', ['test/interpolation_test.cc'])
498             create_ardour_test_program(bld, obj.includes, 'midi_clock_slave', 'test_midi_clock_slave', ['test/midi_clock_slave_test.cc'])
499             create_ardour_test_program(bld, obj.includes, 'resampled_source', 'test_resampled_source', ['test/resampled_source_test.cc'])
500             create_ardour_test_program(bld, obj.includes, 'framewalk_to_beats', 'test_framewalk_to_beats', ['test/framewalk_to_beats_test.cc'])
501             create_ardour_test_program(bld, obj.includes, 'framepos_plus_beats', 'test_framepos_plus_beats', ['test/framepos_plus_beats_test.cc'])
502             create_ardour_test_program(bld, obj.includes, 'framepos_minus_beats', 'test_framepos_minus_beats', ['test/framepos_minus_beats_test.cc'])
503             create_ardour_test_program(bld, obj.includes, 'playlist_equivalent_regions', 'test_playlist_equivalent_regions', ['test/playlist_equivalent_regions_test.cc'])
504             create_ardour_test_program(bld, obj.includes, 'playlist_layering', 'test_playlist_layering', ['test/playlist_layering_test.cc'])
505             create_ardour_test_program(bld, obj.includes, 'region_naming', 'test_region_naming', ['test/region_naming_test.cc'])
506             create_ardour_test_program(bld, obj.includes, 'control_surface', 'test_control_surfaces', ['test/control_surfaces_test.cc'])
507             create_ardour_test_program(bld, obj.includes, 'mtdm_test', 'test_mtdm', ['test/mtdm_test.cc'])
508             create_ardour_test_program(bld, obj.includes, 'session_test', 'test_session', ['test/session_test.cc'])
509
510         test_sources  = '''
511             test/automation_list_property_test.cc
512             test/bbt_test.cc
513             test/tempo_test.cc
514             test/interpolation_test.cc
515             test/midi_clock_slave_test.cc
516             test/resampled_source_test.cc
517             test/framewalk_to_beats_test.cc
518             test/framepos_plus_beats_test.cc
519             test/framepos_minus_beats_test.cc
520             test/playlist_equivalent_regions_test.cc
521             test/playlist_layering_test.cc
522             test/region_naming_test.cc
523             test/control_surfaces_test.cc
524             test/mtdm_test.cc
525             test/session_test.cc
526         '''.split()
527
528 # Tests that don't work
529 #                test/playlist_read_test.cc
530 #                test/audio_region_read_test.cc
531 #                test/combine_regions_test.cc
532 #                test/mantis_3356_test.cc
533
534         create_ardour_test_program(bld, obj.includes, 'libardour-tests', 'run-tests', test_sources)
535
536         # Tester to just load a session
537         session_load_tester = bld(features = 'cxx cxxprogram')
538         session_load_tester.source = '''
539                     test/test_util.cc
540                     test/load_session.cc
541                     test/dummy_lxvst.cc
542             '''.split()
543
544         session_load_tester.includes  = obj.includes
545         session_load_tester.includes.append ('test')
546         session_load_tester.uselib    = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
547                              'SAMPLERATE','XML','LRDF','COREAUDIO']
548         session_load_tester.use       = ['libpbd','libmidipp','ardour']
549         session_load_tester.name      = 'libardour-session-load-tester'
550         session_load_tester.target    = 'load-session'
551         session_load_tester.install_path = ''
552         session_load_tester.defines      = [
553             'PACKAGE="libardour3profile"',
554             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
555             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
556             'LOCALEDIR="' + os.path.join(
557                 os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
558             'VAMP_DIR="' + os.path.join(
559                 os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
560             ]
561         if bld.env['FPU_OPTIMIZATION']:
562             session_load_tester.source += [ 'sse_functions_xmm.cc' ]
563             if (bld.env['build_target'] == 'i386'
564                 or bld.env['build_target'] == 'i686'):
565                 session_load_tester.source += [ 'sse_functions.s' ]
566             elif bld.env['build_target'] == 'x86_64':
567                 session_load_tester.source += [ 'sse_functions_64bit.s' ]
568
569         # Profiling
570         for p in ['runpc', 'lots_of_regions', 'load_session']:
571             profilingobj = bld(features = 'cxx cxxprogram')
572             profilingobj.source = '''
573                     test/dummy_lxvst.cc
574                     test/test_util.cc
575             '''.split()
576
577             profilingobj.source.append('test/profiling/%s.cc' % p)
578
579             profilingobj.includes  = obj.includes
580             profilingobj.includes.append ('test')
581             profilingobj.uselib    = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
582                              'SAMPLERATE','XML','LRDF','COREAUDIO']
583             profilingobj.use       = ['libpbd','libmidipp','ardour']
584             profilingobj.name      = 'libardour-profiling'
585             profilingobj.target    = p
586             profilingobj.install_path = ''
587             profilingobj.defines      = [
588                 'PACKAGE="libardour3profile"',
589                 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
590                 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
591                 'LOCALEDIR="' + os.path.join(
592                     os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
593                 'VAMP_DIR="' + os.path.join(
594                     os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
595                 ]
596             if bld.env['FPU_OPTIMIZATION']:
597                 profilingobj.source += [ 'sse_functions_xmm.cc' ]
598                 if (bld.env['build_target'] == 'i386'
599                     or bld.env['build_target'] == 'i686'):
600                     profilingobj.source += [ 'sse_functions.s' ]
601                 elif bld.env['build_target'] == 'x86_64':
602                     profilingobj.source += [ 'sse_functions_64bit.s' ]
603
604 def create_ardour_test_program(bld, includes, name, target, sources):
605     testobj              = bld(features = 'cxx cxxprogram')
606     testobj.includes     = includes + ['test', '../pbd', '..']
607     testobj.source       = sources
608     testobj.uselib       = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
609                             'SAMPLERATE','XML','LRDF','COREAUDIO']
610     testobj.use          = ['libpbd','libmidipp','libevoral','libvamphost',
611                             'libvampplugin','libtaglib','librubberband',
612                             'libaudiographer','libltc','ardour','testcommon']
613     testobj.name         = name
614     testobj.target       = target
615     # not sure about install path
616     testobj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
617     testobj.defines      = [
618         'PACKAGE="libardour3test"',
619         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
620         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
621         'LOCALEDIR="' + os.path.join(
622             os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
623         'VAMP_DIR="' + os.path.join(
624             os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
625         ]
626
627 def shutdown():
628     autowaf.shutdown()
629
630 def i18n(bld):
631     autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
632                        'Paul Davis')
633
634 def i18n_pot(bld):
635     autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
636                        'Paul Davis')
637
638 def i18n_po(bld):
639     autowaf.build_i18n_po(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
640                        'Paul Davis')
641
642 def i18n_mo(bld):
643     autowaf.build_i18n_mo(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
644                        'Paul Davis')