2013-07-24 19:29:45 -04:00
|
|
|
1#!/usr/bin/env python
|
2011-09-29 15:17:54 -04:00
|
|
|
from waflib.extras import autowaf as autowaf
|
2011-09-29 15:58:05 -04:00
|
|
|
from waflib import Options
|
2009-02-25 16:48:32 -05:00
|
|
|
import os
|
2009-10-06 18:07:10 -04:00
|
|
|
import re
|
|
|
|
import subprocess
|
2013-08-09 11:04:04 -04:00
|
|
|
import sys
|
2009-02-25 16:48:32 -05:00
|
|
|
|
2009-10-15 14:56:11 -04:00
|
|
|
# default state file version for this build
|
2012-04-16 12:32:22 -04:00
|
|
|
CURRENT_SESSION_FILE_VERSION = 3001
|
2009-10-15 14:56:11 -04:00
|
|
|
|
2009-02-25 16:48:32 -05:00
|
|
|
# Variables for 'waf dist'
|
2011-11-21 16:27:30 -05:00
|
|
|
APPNAME = 'libardour3'
|
2013-01-23 18:19:58 -05:00
|
|
|
I18N_PACKAGE = 'ardour3'
|
2009-02-25 16:48:32 -05:00
|
|
|
|
|
|
|
# Mandatory variables
|
2011-09-29 15:17:54 -04:00
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
2009-02-25 16:48:32 -05:00
|
|
|
|
2009-02-25 21:24:16 -05:00
|
|
|
path_prefix = 'libs/ardour/'
|
|
|
|
|
2009-07-22 09:51:16 -04:00
|
|
|
libardour_sources = [
|
2011-03-16 12:32:56 -04:00
|
|
|
'amp.cc',
|
|
|
|
'analyser.cc',
|
2013-08-07 22:22:11 -04:00
|
|
|
'async_midi_port.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'audio_buffer.cc',
|
|
|
|
'audio_diskstream.cc',
|
|
|
|
'audio_library.cc',
|
|
|
|
'audio_playlist.cc',
|
|
|
|
'audio_playlist_importer.cc',
|
2011-05-13 15:55:39 -04:00
|
|
|
'audio_playlist_source.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'audio_port.cc',
|
|
|
|
'audio_region_importer.cc',
|
|
|
|
'audio_track.cc',
|
|
|
|
'audio_track_importer.cc',
|
|
|
|
'audioanalyser.cc',
|
|
|
|
'audioengine.cc',
|
|
|
|
'audiofile_tagger.cc',
|
|
|
|
'audiofilesource.cc',
|
|
|
|
'audioregion.cc',
|
|
|
|
'audiosource.cc',
|
|
|
|
'auditioner.cc',
|
|
|
|
'automatable.cc',
|
|
|
|
'automation.cc',
|
|
|
|
'automation_control.cc',
|
|
|
|
'automation_list.cc',
|
2012-07-13 17:05:45 -04:00
|
|
|
'automation_watch.cc',
|
2013-08-01 14:43:12 -04:00
|
|
|
'backend_search_path.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'beats_frames_converter.cc',
|
|
|
|
'broadcast_info.cc',
|
|
|
|
'buffer.cc',
|
|
|
|
'buffer_manager.cc',
|
|
|
|
'buffer_set.cc',
|
|
|
|
'bundle.cc',
|
|
|
|
'butler.cc',
|
2011-01-16 14:41:11 -05:00
|
|
|
'capturing_processor.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'chan_count.cc',
|
|
|
|
'chan_mapping.cc',
|
|
|
|
'configuration.cc',
|
|
|
|
'config_text.cc',
|
|
|
|
'control_protocol_manager.cc',
|
|
|
|
'control_protocol_search_path.cc',
|
|
|
|
'cycle_timer.cc',
|
2011-04-22 23:34:42 -04:00
|
|
|
'data_type.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'default_click.cc',
|
|
|
|
'debug.cc',
|
|
|
|
'delivery.cc',
|
|
|
|
'directory_names.cc',
|
|
|
|
'diskstream.cc',
|
|
|
|
'element_import_handler.cc',
|
|
|
|
'element_importer.cc',
|
2013-09-19 17:34:23 -04:00
|
|
|
'engine_slave.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'enums.cc',
|
|
|
|
'event_type_map.cc',
|
|
|
|
'export_channel.cc',
|
|
|
|
'export_channel_configuration.cc',
|
|
|
|
'export_failed.cc',
|
|
|
|
'export_filename.cc',
|
|
|
|
'export_format_base.cc',
|
|
|
|
'export_format_manager.cc',
|
|
|
|
'export_format_specification.cc',
|
|
|
|
'export_formats.cc',
|
2011-04-02 09:53:03 -04:00
|
|
|
'export_formats_search_path.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'export_graph_builder.cc',
|
|
|
|
'export_handler.cc',
|
|
|
|
'export_preset.cc',
|
|
|
|
'export_profile_manager.cc',
|
|
|
|
'export_status.cc',
|
|
|
|
'export_timespan.cc',
|
|
|
|
'file_source.cc',
|
|
|
|
'filename_extensions.cc',
|
|
|
|
'filesystem_paths.cc',
|
|
|
|
'filter.cc',
|
|
|
|
'find_session.cc',
|
|
|
|
'globals.cc',
|
|
|
|
'graph.cc',
|
|
|
|
'graphnode.cc',
|
2013-07-22 12:42:01 -04:00
|
|
|
'iec1ppmdsp.cc',
|
|
|
|
'iec2ppmdsp.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'import.cc',
|
2012-06-11 08:07:17 -04:00
|
|
|
'instrument_info.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'internal_return.cc',
|
|
|
|
'internal_send.cc',
|
|
|
|
'interpolation.cc',
|
|
|
|
'io.cc',
|
|
|
|
'io_processor.cc',
|
2013-07-06 20:00:43 -04:00
|
|
|
'kmeterdsp.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'ladspa_plugin.cc',
|
|
|
|
'location.cc',
|
|
|
|
'location_importer.cc',
|
2012-12-14 11:18:47 -05:00
|
|
|
'ltc_slave.cc',
|
2013-07-10 08:31:25 -04:00
|
|
|
'lv2_bundled_search_path.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'meter.cc',
|
|
|
|
'midi_automation_list_binder.cc',
|
|
|
|
'midi_buffer.cc',
|
|
|
|
'midi_clock_slave.cc',
|
|
|
|
'midi_diskstream.cc',
|
|
|
|
'midi_model.cc',
|
|
|
|
'midi_patch_manager.cc',
|
2012-03-20 14:03:46 -04:00
|
|
|
'midi_patch_search_path.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'midi_playlist.cc',
|
2011-05-28 21:54:19 -04:00
|
|
|
'midi_playlist_source.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'midi_port.cc',
|
|
|
|
'midi_region.cc',
|
|
|
|
'midi_ring_buffer.cc',
|
|
|
|
'midi_source.cc',
|
|
|
|
'midi_state_tracker.cc',
|
|
|
|
'midi_stretch.cc',
|
|
|
|
'midi_track.cc',
|
|
|
|
'midi_ui.cc',
|
2013-08-07 22:22:11 -04:00
|
|
|
'midiport_manager.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'mix.cc',
|
2010-03-10 12:31:16 -05:00
|
|
|
'monitor_processor.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'mtc_slave.cc',
|
|
|
|
'mtdm.cc',
|
|
|
|
'mute_master.cc',
|
|
|
|
'onset_detector.cc',
|
|
|
|
'operations.cc',
|
2011-01-26 20:31:03 -05:00
|
|
|
'pan_controllable.cc',
|
|
|
|
'pannable.cc',
|
|
|
|
'panner.cc',
|
|
|
|
'panner_manager.cc',
|
|
|
|
'panner_search_path.cc',
|
|
|
|
'panner_shell.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'pcm_utils.cc',
|
|
|
|
'pi_controller.cc',
|
|
|
|
'playlist.cc',
|
|
|
|
'playlist_factory.cc',
|
2011-05-16 11:49:26 -04:00
|
|
|
'playlist_source.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'plugin.cc',
|
|
|
|
'plugin_insert.cc',
|
|
|
|
'plugin_manager.cc',
|
|
|
|
'port.cc',
|
|
|
|
'port_insert.cc',
|
2013-07-31 19:47:20 -04:00
|
|
|
'port_manager.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'port_set.cc',
|
|
|
|
'process_thread.cc',
|
|
|
|
'processor.cc',
|
|
|
|
'progress.cc',
|
|
|
|
'quantize.cc',
|
|
|
|
'rc_configuration.cc',
|
|
|
|
'recent_sessions.cc',
|
|
|
|
'region_factory.cc',
|
|
|
|
'resampled_source.cc',
|
|
|
|
'region.cc',
|
|
|
|
'return.cc',
|
|
|
|
'reverse.cc',
|
|
|
|
'route.cc',
|
2011-11-09 12:44:39 -05:00
|
|
|
'route_graph.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'route_group.cc',
|
|
|
|
'route_group_member.cc',
|
|
|
|
'rb_effect.cc',
|
|
|
|
'send.cc',
|
|
|
|
'session.cc',
|
|
|
|
'session_butler.cc',
|
|
|
|
'session_click.cc',
|
|
|
|
'session_command.cc',
|
|
|
|
'session_configuration.cc',
|
|
|
|
'session_directory.cc',
|
|
|
|
'session_events.cc',
|
|
|
|
'session_export.cc',
|
|
|
|
'session_handle.cc',
|
2012-12-14 11:18:47 -05:00
|
|
|
'session_ltc.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'session_metadata.cc',
|
|
|
|
'session_midi.cc',
|
|
|
|
'session_object.cc',
|
|
|
|
'session_playlists.cc',
|
|
|
|
'session_process.cc',
|
|
|
|
'session_rtevents.cc',
|
|
|
|
'session_state.cc',
|
|
|
|
'session_state_utils.cc',
|
|
|
|
'session_time.cc',
|
|
|
|
'session_transport.cc',
|
|
|
|
'slave.cc',
|
|
|
|
'smf_source.cc',
|
|
|
|
'sndfile_helpers.cc',
|
|
|
|
'sndfileimportable.cc',
|
|
|
|
'sndfilesource.cc',
|
|
|
|
'source.cc',
|
|
|
|
'source_factory.cc',
|
2010-11-26 12:43:03 -05:00
|
|
|
'speakers.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'strip_silence.cc',
|
2013-03-17 09:53:30 -04:00
|
|
|
'revision.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'tape_file_matcher.cc',
|
|
|
|
'template_utils.cc',
|
|
|
|
'tempo.cc',
|
|
|
|
'tempo_map_importer.cc',
|
2010-04-13 16:48:33 -04:00
|
|
|
'thread_buffers.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'ticker.cc',
|
|
|
|
'track.cc',
|
|
|
|
'transient_detector.cc',
|
|
|
|
'unknown_processor.cc',
|
|
|
|
'user_bundle.cc',
|
|
|
|
'utils.cc',
|
2011-11-22 10:14:41 -05:00
|
|
|
'version.cc',
|
2013-07-22 12:42:01 -04:00
|
|
|
'vumeterdsp.cc',
|
2012-12-14 11:18:47 -05:00
|
|
|
'worker.cc'
|
2009-07-22 09:51:16 -04:00
|
|
|
]
|
|
|
|
|
2009-10-06 18:07:10 -04:00
|
|
|
def flac_supported():
|
2011-04-22 18:15:21 -04:00
|
|
|
cmd = subprocess.Popen ("sndfile-info testfile.flac",
|
|
|
|
stdout = subprocess.PIPE,
|
|
|
|
stderr = subprocess.STDOUT, shell = True)
|
|
|
|
out = cmd.communicate()[0].decode('utf-8');
|
|
|
|
return re.search ('unknown format', out) == None
|
2009-10-06 18:07:10 -04:00
|
|
|
|
|
|
|
def ogg_supported():
|
2011-04-22 18:15:21 -04:00
|
|
|
cmd = subprocess.Popen ("sndfile-info testfile.ogg",
|
|
|
|
stdout = subprocess.PIPE,
|
|
|
|
stderr = subprocess.STDOUT, shell = True)
|
|
|
|
out = cmd.communicate()[0].decode('utf-8');
|
|
|
|
return re.search ('unknown format', out) == None
|
2009-10-06 18:07:10 -04:00
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
def options(opt):
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.set_options(opt)
|
2009-02-25 16:48:32 -05:00
|
|
|
|
|
|
|
def configure(conf):
|
2011-09-29 15:58:05 -04:00
|
|
|
conf.load('compiler_cxx')
|
|
|
|
conf.load('gas')
|
2013-06-13 10:53:36 -04:00
|
|
|
# we don't use hard-coded micro versions with ardour, so hard code it to zero
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.build_version_files(
|
|
|
|
path_prefix + 'ardour/version.h',
|
|
|
|
path_prefix + 'version.cc',
|
2013-06-13 10:53:36 -04:00
|
|
|
'libardour3', conf.env['MAJOR'], conf.env['MINOR'], 0)
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.configure(conf)
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO',
|
|
|
|
atleast_version='0.3.2')
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.check_pkg(conf, 'lrdf', uselib_store='LRDF',
|
|
|
|
atleast_version='0.4.0')
|
|
|
|
autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE',
|
|
|
|
atleast_version='0.1.0')
|
|
|
|
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP',
|
|
|
|
atleast_version='2.0')
|
2013-08-09 11:04:04 -04:00
|
|
|
|
|
|
|
if re.search ("linux", sys.platform) != None:
|
|
|
|
autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
|
|
|
|
|
2011-11-21 10:28:19 -05:00
|
|
|
if Options.options.lv2:
|
2012-05-28 09:51:26 -04:00
|
|
|
autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
|
|
|
|
atleast_version='1.0.0', mandatory=True)
|
2012-08-07 20:16:30 -04:00
|
|
|
autowaf.check_pkg(conf, 'lv2', uselib_store='NEW_LV2',
|
2012-09-16 13:01:23 -04:00
|
|
|
atleast_version='1.0.15', mandatory=False)
|
2012-05-28 09:51:26 -04:00
|
|
|
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
|
|
|
|
atleast_version='0.14.0', mandatory=True)
|
|
|
|
autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
|
|
|
|
atleast_version='0.8.0', mandatory=True)
|
|
|
|
autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM',
|
|
|
|
atleast_version='0.2.0', mandatory=True)
|
2011-11-21 10:28:19 -05:00
|
|
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
2012-05-28 09:51:26 -04:00
|
|
|
atleast_version='0.14.0', mandatory=True)
|
2013-01-27 16:25:34 -05:00
|
|
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='NEW_LILV',
|
2013-01-27 16:43:33 -05:00
|
|
|
atleast_version='0.15.0', mandatory=False)
|
2012-05-28 09:51:26 -04:00
|
|
|
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
|
|
|
atleast_version='0.6.0', mandatory=False)
|
|
|
|
conf.define ('LV2_SUPPORT', 1)
|
2012-01-27 20:45:15 -05:00
|
|
|
|
2011-10-28 20:12:41 -04:00
|
|
|
# autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
|
|
|
|
# mandatory=False)
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT',
|
|
|
|
atleast_version='1.12.0', mandatory=False)
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
|
2011-05-16 14:02:38 -04:00
|
|
|
autowaf.check_pkg(conf, 'flac', uselib_store='FLAC',
|
|
|
|
atleast_version='1.2.1')
|
|
|
|
autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL',
|
|
|
|
atleast_version='7.0.0')
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
# we don't try to detect this, since its part of our source tree
|
|
|
|
|
|
|
|
conf.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
|
|
|
|
conf.define('USE_RUBBERBAND', 1) # controls whether we actually use it
|
|
|
|
|
|
|
|
conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
|
|
|
|
|
2011-09-30 08:14:44 -04:00
|
|
|
conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H',mandatory=False)
|
2012-06-12 12:41:29 -04:00
|
|
|
conf.check(header_name='sys/statvfs.h', define_name='HAVE_SYS_STATVFS_H',mandatory=False)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-09-30 08:14:44 -04:00
|
|
|
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
if flac_supported():
|
|
|
|
conf.define ('HAVE_FLAC', 1)
|
|
|
|
if ogg_supported():
|
|
|
|
conf.define ('HAVE_OGG', 1)
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
conf.write_config_header('libardour-config.h', remove=False)
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
# Boost headers
|
2011-09-29 15:17:54 -04:00
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
|
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
|
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp')
|
|
|
|
autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp')
|
2009-02-25 16:48:32 -05:00
|
|
|
|
2009-10-06 18:07:10 -04:00
|
|
|
|
2009-02-25 16:48:32 -05:00
|
|
|
def build(bld):
|
2013-06-13 10:53:36 -04:00
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
LIBARDOUR_LIB_VERSION = "3.0.0."
|
|
|
|
|
2011-04-22 18:15:21 -04:00
|
|
|
# Library
|
2013-03-20 17:18:55 -04:00
|
|
|
if bld.is_defined ('INTERNAL_SHARED_LIBS'):
|
|
|
|
obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources)
|
|
|
|
else:
|
|
|
|
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
|
|
|
|
obj.cxxflags = [ '-fPIC' ]
|
|
|
|
obj.cflags = [ '-fPIC' ]
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.export_includes = ['.']
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.includes = ['.', '../surfaces/control_protocol', '..']
|
2013-03-20 17:18:55 -04:00
|
|
|
obj.name = 'ardour'
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.target = 'ardour'
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
|
2013-10-08 14:16:13 -04:00
|
|
|
'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS',
|
2011-05-16 14:02:38 -04:00
|
|
|
'OSX','BOOST','CURL','DL']
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
2011-05-16 14:02:38 -04:00
|
|
|
'libvampplugin','libtaglib','librubberband',
|
2013-09-24 22:22:43 -04:00
|
|
|
'libaudiographer','libltc','libtimecode']
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.vnum = LIBARDOUR_LIB_VERSION
|
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.defines = [
|
2011-11-21 17:24:56 -05:00
|
|
|
'PACKAGE="' + I18N_PACKAGE + '"',
|
2011-05-16 14:02:38 -04:00
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
2011-09-29 15:17:54 -04:00
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
2012-05-18 13:24:06 -04:00
|
|
|
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
2012-10-10 00:31:59 -04:00
|
|
|
'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"',
|
|
|
|
'EVORAL_MIDI_XML=1'
|
2011-05-16 14:02:38 -04:00
|
|
|
]
|
2011-04-22 18:15:21 -04:00
|
|
|
|
|
|
|
#obj.source += ' st_stretch.cc st_pitch.cc '
|
|
|
|
#obj.uselib += ' SOUNDTOUCH '
|
|
|
|
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
|
|
|
|
|
2011-09-29 16:29:06 -04:00
|
|
|
if bld.is_defined('HAVE_LILV') :
|
2012-02-24 23:16:42 -05:00
|
|
|
obj.source += ['lv2_plugin.cc', 'lv2_evbuf.c', 'uri_map.cc']
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.uselib += ['LILV']
|
2011-09-29 16:29:06 -04:00
|
|
|
if bld.is_defined('HAVE_SUIL'):
|
2011-05-16 14:02:38 -04:00
|
|
|
obj.uselib += ['SUIL']
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-11-21 12:42:29 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT'):
|
2011-11-22 11:30:58 -05:00
|
|
|
obj.source += [ 'windows_vst_plugin.cc']
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.includes += [ '../fst' ]
|
2011-11-21 12:42:29 -05:00
|
|
|
obj.defines += [ 'WINDOWS_VST_SUPPORT' ]
|
2011-09-29 17:36:31 -04:00
|
|
|
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('LXVST_SUPPORT'):
|
2011-11-23 14:31:04 -05:00
|
|
|
obj.source += [ 'lxvst_plugin.cc', 'linux_vst_support.cc', 'linux_vst_info_file.cc' ]
|
2011-09-29 17:36:31 -04:00
|
|
|
obj.defines += [ 'LXVST_SUPPORT' ]
|
2011-04-22 18:15:21 -04:00
|
|
|
|
2011-11-22 11:30:58 -05:00
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT'):
|
2011-12-02 14:32:42 -05:00
|
|
|
obj.source += [ 'session_vst.cc', 'vst_plugin.cc' ]
|
2011-11-22 11:30:58 -05:00
|
|
|
|
2011-10-18 11:08:42 -04:00
|
|
|
if bld.is_defined('HAVE_COREAUDIO'):
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.use += ['libappleutility']
|
2011-12-02 15:03:03 -05:00
|
|
|
|
|
|
|
if bld.is_defined('AUDIOUNIT_SUPPORT'):
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source += [ 'audio_unit.cc' ]
|
|
|
|
|
2011-09-30 13:50:08 -04:00
|
|
|
if Options.options.fpu_optimization:
|
2012-04-16 12:32:22 -04:00
|
|
|
if (bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686'):
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source += [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
|
|
|
|
elif bld.env['build_target'] == 'x86_64':
|
|
|
|
obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
|
|
|
|
|
|
|
|
# i18n
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('ENABLE_NLS'):
|
2011-09-29 15:17:54 -04:00
|
|
|
mo_files = bld.path.ant_glob('po/*.mo')
|
2011-04-22 18:15:21 -04:00
|
|
|
for mo in mo_files:
|
2011-11-05 12:35:24 -04:00
|
|
|
lang = os.path.basename(mo.srcpath()).replace('.mo', '')
|
2011-05-16 14:02:38 -04:00
|
|
|
bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
|
2011-11-21 18:20:31 -05:00
|
|
|
lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
|
2011-05-16 14:02:38 -04:00
|
|
|
mo)
|
2009-07-17 18:12:21 -04:00
|
|
|
|
2011-11-12 22:54:29 -05:00
|
|
|
if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
|
2011-04-22 18:15:21 -04:00
|
|
|
# Unit tests
|
2013-07-11 10:57:21 -04:00
|
|
|
# only build these common sources once
|
|
|
|
testcommon = bld(features = 'cxx')
|
|
|
|
testcommon.includes = obj.includes + ['test', '../pbd', '..']
|
|
|
|
testcommon.source = ['test/test_globals.cc', 'test/testrunner.cc', 'test/test_needing_session.cc',
|
2013-07-11 11:00:59 -04:00
|
|
|
'test/test_common.cc', 'test/dummy_lxvst.cc', 'test/audio_region_test.cc', 'test/test_util.cc']
|
2013-10-08 14:16:13 -04:00
|
|
|
testcommon.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
2013-07-11 10:57:21 -04:00
|
|
|
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
|
|
|
testcommon.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
|
|
|
'libvampplugin','libtaglib','librubberband',
|
|
|
|
'libaudiographer','libltc','ardour']
|
|
|
|
testcommon.defines = [
|
2011-05-16 14:02:38 -04:00
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
2011-09-29 15:17:54 -04:00
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
2011-05-16 14:02:38 -04:00
|
|
|
'LOCALEDIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
'VAMP_DIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
|
|
|
|
]
|
2013-07-11 10:57:21 -04:00
|
|
|
testcommon.name = 'testcommon'
|
|
|
|
|
2011-09-30 15:06:48 -04:00
|
|
|
if bld.env['FPU_OPTIMIZATION']:
|
2013-07-11 10:57:21 -04:00
|
|
|
testcommon.source += [ 'sse_functions_xmm.cc' ]
|
2011-05-16 14:02:38 -04:00
|
|
|
if (bld.env['build_target'] == 'i386'
|
|
|
|
or bld.env['build_target'] == 'i686'):
|
2013-07-11 10:57:21 -04:00
|
|
|
testcommon.source += [ 'sse_functions.s' ]
|
2011-04-22 18:15:21 -04:00
|
|
|
elif bld.env['build_target'] == 'x86_64':
|
2013-07-11 10:57:21 -04:00
|
|
|
testcommon.source += [ 'sse_functions_64bit.s' ]
|
|
|
|
|
|
|
|
if bld.env['SINGLE_TESTS']:
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'automation_list_property_test', 'test_automation_list_property', ['test/automation_list_property_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'bbt', 'test_bbt', ['test/bbt_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'tempo', 'test_tempo', ['test/tempo_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'interpolation', 'test_interpolation', ['test/interpolation_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'midi_clock_slave', 'test_midi_clock_slave', ['test/midi_clock_slave_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'resampled_source', 'test_resampled_source', ['test/resampled_source_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'framewalk_to_beats', 'test_framewalk_to_beats', ['test/framewalk_to_beats_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'framepos_plus_beats', 'test_framepos_plus_beats', ['test/framepos_plus_beats_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'framepos_minus_beats', 'test_framepos_minus_beats', ['test/framepos_minus_beats_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'playlist_equivalent_regions', 'test_playlist_equivalent_regions', ['test/playlist_equivalent_regions_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'playlist_layering', 'test_playlist_layering', ['test/playlist_layering_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'region_naming', 'test_region_naming', ['test/region_naming_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'control_surface', 'test_control_surfaces', ['test/control_surfaces_test.cc'])
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'mtdm_test', 'test_mtdm', ['test/mtdm_test.cc'])
|
2013-07-11 11:11:45 -04:00
|
|
|
create_ardour_test_program(bld, obj.includes, 'session_test', 'test_session', ['test/session_test.cc'])
|
2013-07-11 10:57:21 -04:00
|
|
|
|
|
|
|
test_sources = '''
|
|
|
|
test/automation_list_property_test.cc
|
|
|
|
test/bbt_test.cc
|
|
|
|
test/tempo_test.cc
|
|
|
|
test/interpolation_test.cc
|
|
|
|
test/midi_clock_slave_test.cc
|
|
|
|
test/resampled_source_test.cc
|
|
|
|
test/framewalk_to_beats_test.cc
|
|
|
|
test/framepos_plus_beats_test.cc
|
|
|
|
test/framepos_minus_beats_test.cc
|
|
|
|
test/playlist_equivalent_regions_test.cc
|
|
|
|
test/playlist_layering_test.cc
|
|
|
|
test/region_naming_test.cc
|
|
|
|
test/control_surfaces_test.cc
|
|
|
|
test/mtdm_test.cc
|
2013-07-11 11:11:45 -04:00
|
|
|
test/session_test.cc
|
2013-07-11 10:57:21 -04:00
|
|
|
'''.split()
|
|
|
|
|
|
|
|
# Tests that don't work
|
|
|
|
# test/playlist_read_test.cc
|
|
|
|
# test/audio_region_read_test.cc
|
|
|
|
# test/combine_regions_test.cc
|
|
|
|
# test/mantis_3356_test.cc
|
|
|
|
|
|
|
|
create_ardour_test_program(bld, obj.includes, 'libardour-tests', 'run-tests', test_sources)
|
2009-05-04 18:10:15 -04:00
|
|
|
|
2012-06-18 14:28:40 -04:00
|
|
|
# Tester to just load a session
|
|
|
|
session_load_tester = bld(features = 'cxx cxxprogram')
|
|
|
|
session_load_tester.source = '''
|
|
|
|
test/test_util.cc
|
|
|
|
test/load_session.cc
|
|
|
|
test/dummy_lxvst.cc
|
|
|
|
'''.split()
|
|
|
|
|
|
|
|
session_load_tester.includes = obj.includes
|
|
|
|
session_load_tester.includes.append ('test')
|
2013-10-08 14:16:13 -04:00
|
|
|
session_load_tester.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
2012-06-18 14:28:40 -04:00
|
|
|
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
2013-03-29 16:01:17 -04:00
|
|
|
session_load_tester.use = ['libpbd','libmidipp','ardour']
|
2012-06-18 14:28:40 -04:00
|
|
|
session_load_tester.name = 'libardour-session-load-tester'
|
|
|
|
session_load_tester.target = 'load-session'
|
|
|
|
session_load_tester.install_path = ''
|
|
|
|
session_load_tester.defines = [
|
|
|
|
'PACKAGE="libardour3profile"',
|
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
'VAMP_DIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
|
|
|
|
]
|
|
|
|
if bld.env['FPU_OPTIMIZATION']:
|
|
|
|
session_load_tester.source += [ 'sse_functions_xmm.cc' ]
|
|
|
|
if (bld.env['build_target'] == 'i386'
|
|
|
|
or bld.env['build_target'] == 'i686'):
|
|
|
|
session_load_tester.source += [ 'sse_functions.s' ]
|
|
|
|
elif bld.env['build_target'] == 'x86_64':
|
|
|
|
session_load_tester.source += [ 'sse_functions_64bit.s' ]
|
|
|
|
|
2012-01-23 10:01:08 -05:00
|
|
|
# Profiling
|
2012-06-18 20:25:26 -04:00
|
|
|
for p in ['runpc', 'lots_of_regions', 'load_session']:
|
2012-06-17 17:20:51 -04:00
|
|
|
profilingobj = bld(features = 'cxx cxxprogram')
|
|
|
|
profilingobj.source = '''
|
|
|
|
test/dummy_lxvst.cc
|
|
|
|
test/test_util.cc
|
|
|
|
'''.split()
|
|
|
|
|
|
|
|
profilingobj.source.append('test/profiling/%s.cc' % p)
|
|
|
|
|
|
|
|
profilingobj.includes = obj.includes
|
|
|
|
profilingobj.includes.append ('test')
|
2013-10-08 14:16:13 -04:00
|
|
|
profilingobj.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
2012-01-23 10:01:08 -05:00
|
|
|
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
2013-03-29 16:01:17 -04:00
|
|
|
profilingobj.use = ['libpbd','libmidipp','ardour']
|
2012-06-17 17:20:51 -04:00
|
|
|
profilingobj.name = 'libardour-profiling'
|
|
|
|
profilingobj.target = p
|
|
|
|
profilingobj.install_path = ''
|
|
|
|
profilingobj.defines = [
|
|
|
|
'PACKAGE="libardour3profile"',
|
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
'VAMP_DIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
|
|
|
|
]
|
|
|
|
if bld.env['FPU_OPTIMIZATION']:
|
|
|
|
profilingobj.source += [ 'sse_functions_xmm.cc' ]
|
|
|
|
if (bld.env['build_target'] == 'i386'
|
|
|
|
or bld.env['build_target'] == 'i686'):
|
|
|
|
profilingobj.source += [ 'sse_functions.s' ]
|
|
|
|
elif bld.env['build_target'] == 'x86_64':
|
|
|
|
profilingobj.source += [ 'sse_functions_64bit.s' ]
|
2012-01-23 10:01:08 -05:00
|
|
|
|
2013-07-11 10:57:21 -04:00
|
|
|
def create_ardour_test_program(bld, includes, name, target, sources):
|
|
|
|
testobj = bld(features = 'cxx cxxprogram')
|
|
|
|
testobj.includes = includes + ['test', '../pbd', '..']
|
|
|
|
testobj.source = sources
|
2013-10-08 14:16:13 -04:00
|
|
|
testobj.uselib = ['CPPUNIT','SIGCPP','GLIBMM','GTHREAD',
|
2013-07-11 10:57:21 -04:00
|
|
|
'SAMPLERATE','XML','LRDF','COREAUDIO']
|
|
|
|
testobj.use = ['libpbd','libmidipp','libevoral','libvamphost',
|
|
|
|
'libvampplugin','libtaglib','librubberband',
|
|
|
|
'libaudiographer','libltc','ardour','testcommon']
|
|
|
|
testobj.name = name
|
|
|
|
testobj.target = target
|
|
|
|
# not sure about install path
|
|
|
|
testobj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
|
|
|
testobj.defines = [
|
|
|
|
'PACKAGE="libardour3test"',
|
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
'VAMP_DIR="' + os.path.join(
|
|
|
|
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
|
|
|
|
]
|
|
|
|
|
2009-02-25 16:48:32 -05:00
|
|
|
def shutdown():
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.shutdown()
|
2009-02-25 16:48:32 -05:00
|
|
|
|
2009-07-22 09:51:16 -04:00
|
|
|
def i18n(bld):
|
2011-11-21 16:27:30 -05:00
|
|
|
autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_pot(bld):
|
|
|
|
autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_po(bld):
|
|
|
|
autowaf.build_i18n_po(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_mo(bld):
|
|
|
|
autowaf.build_i18n_mo(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
|
2011-11-05 12:35:24 -04:00
|
|
|
'Paul Davis')
|