9 # Version of this package (even if built as a child)
13 LIBARDOUR_VERSION
= "%s.%s.%s" % (MAJOR
, MINOR
, MICRO
)
15 # Library version (UNIX style major, minor, micro)
16 # major increment <=> incompatible changes
17 # minor increment <=> compatible changes (additions)
18 # micro increment <=> no interface changes
19 LIBARDOUR_LIB_VERSION
= '3.0.0'
21 # default state file version for this build
22 CURRENT_SESSION_FILE_VERSION
= 3000
24 # Variables for 'waf dist'
26 VERSION
= LIBARDOUR_VERSION
32 path_prefix
= 'libs/ardour/'
38 'audio_diskstream.cc',
41 'audio_playlist_importer.cc',
42 'audio_playlist_source.cc',
44 'audio_region_importer.cc',
46 'audio_track_importer.cc',
49 'audiofile_tagger.cc',
56 'automation_control.cc',
58 'beats_frames_converter.cc',
66 'capturing_processor.cc',
71 'control_protocol_manager.cc',
72 'control_protocol_search_path.cc',
81 'element_import_handler.cc',
82 'element_importer.cc',
86 'export_channel_configuration.cc',
89 'export_format_base.cc',
90 'export_format_manager.cc',
91 'export_format_specification.cc',
93 'export_formats_search_path.cc',
94 'export_graph_builder.cc',
97 'export_profile_manager.cc',
101 'filename_extensions.cc',
102 'filesystem_paths.cc',
110 'internal_return.cc',
118 'location_importer.cc',
120 'midi_automation_list_binder.cc',
122 'midi_clock_slave.cc',
123 'midi_diskstream.cc',
125 'midi_patch_manager.cc',
129 'midi_ring_buffer.cc',
131 'midi_state_tracker.cc',
136 'monitor_processor.cc',
140 'named_selection.cc',
143 'pan_controllable.cc',
147 'panner_search_path.cc',
152 'playlist_factory.cc',
153 'playlist_source.cc',
164 'rc_configuration.cc',
165 'recent_sessions.cc',
167 'resampled_source.cc',
173 'route_group_member.cc',
179 'session_command.cc',
180 'session_configuration.cc',
181 'session_directory.cc',
185 'session_metadata.cc',
188 'session_playlists.cc',
189 'session_process.cc',
190 'session_rtevents.cc',
192 'session_state_utils.cc',
194 'session_transport.cc',
198 'sndfile_helpers.cc',
199 'sndfileimportable.cc',
206 'tape_file_matcher.cc',
209 'tempo_map_importer.cc',
213 'transient_detector.cc',
214 'unknown_processor.cc',
220 def flac_supported():
221 cmd
= subprocess
.Popen ("sndfile-info testfile.flac",
222 stdout
= subprocess
.PIPE
,
223 stderr
= subprocess
.STDOUT
, shell
= True)
224 out
= cmd
.communicate()[0].decode('utf-8');
225 return re
.search ('unknown format', out
) == None
228 cmd
= subprocess
.Popen ("sndfile-info testfile.ogg",
229 stdout
= subprocess
.PIPE
,
230 stderr
= subprocess
.STDOUT
, shell
= True)
231 out
= cmd
.communicate()[0].decode('utf-8');
232 return re
.search ('unknown format', out
) == None
234 def set_options(opt
):
235 autowaf
.set_options(opt
)
238 autowaf
.build_version_files(
239 path_prefix
+ 'ardour/version.h',
240 path_prefix
+ 'version.cc',
241 'libardour3', MAJOR
, MINOR
, MICRO
)
242 autowaf
.configure(conf
)
243 conf
.check_tool('compiler_cxx gas')
244 autowaf
.check_pkg(conf
, 'aubio', uselib_store
='AUBIO',
245 atleast_version
='0.3.2')
246 autowaf
.check_pkg(conf
, 'jack', uselib_store
='JACK',
247 atleast_version
='0.118.2')
248 autowaf
.check_pkg(conf
, 'libxml-2.0', uselib_store
='XML')
249 autowaf
.check_pkg(conf
, 'lrdf', uselib_store
='LRDF',
250 atleast_version
='0.4.0')
251 autowaf
.check_pkg(conf
, 'samplerate', uselib_store
='SAMPLERATE',
252 atleast_version
='0.1.0')
253 autowaf
.check_pkg(conf
, 'sigc++-2.0', uselib_store
='SIGCPP',
254 atleast_version
='2.0')
255 autowaf
.check_pkg(conf
, 'lilv-0', uselib_store
='LILV',
256 atleast_version
='0.0.0', mandatory
=False)
257 if conf
.env
['HAVE_LILV']:
258 autowaf
.check_pkg(conf
, 'suil-0', uselib_store
='SUIL',
259 atleast_version
='0.2.0', mandatory
=False)
261 autowaf
.check_pkg(conf
, 'slv2', uselib_store
='SLV2',
262 atleast_version
='0.6.4', mandatory
=False)
263 if conf
.env
['HAVE_SLV2']:
264 autowaf
.check_pkg(conf
, 'rasqal', uselib_store
='RASQAL',
265 atleast_version
='0.9.14', mandatory
=False)
266 autowaf
.check_pkg(conf
, 'soundtouch-1.0', uselib_store
='SOUNDTOUCH',
268 autowaf
.check_pkg(conf
, 'cppunit', uselib_store
='CPPUNIT',
269 atleast_version
='1.12.0', mandatory
=False)
270 autowaf
.check_pkg(conf
, 'ogg', uselib_store
='OGG', atleast_version
='1.1.2')
271 autowaf
.check_pkg(conf
, 'flac', uselib_store
='FLAC',
272 atleast_version
='1.2.1')
273 autowaf
.check_pkg(conf
, 'libcurl', uselib_store
='CURL',
274 atleast_version
='7.0.0')
276 # we don't try to detect this, since its part of our source tree
278 conf
.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
279 conf
.define('USE_RUBBERBAND', 1) # controls whether we actually use it
281 conf
.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION
)
283 conf
.check(header_name
='sys/vfs.h', define_name
='HAVE_SYS_VFS_H')
284 conf
.check(header_name
='wordexp.h', define_name
='HAVE_WORDEXP')
286 conf
.check(header_name
='jack/session.h', uselib
= [ 'JACK' ],
287 define_name
='HAVE_JACK_SESSION')
289 conf
.check(header_name
='unistd.h', define_name
='HAVE_UNISTD')
291 conf
.check_cc(fragment
= '''
292 #include <jack/jack.h>
293 void callback(int code, const char* reason, void* arg) { return; }
294 int main(int argc, char **argv) {
296 jack_on_info_shutdown(c, callback, (void*) 0);
300 msg
= 'Checking for jack_on_info_shutdown',
301 define_name
= 'HAVE_JACK_ON_INFO_SHUTDOWN',
304 missing_jack_message
= '''missing - a version of JACK that supports \
305 jack_port_set_latency_range() is required to compile Ardour3. Currently this\
306 means using JACK version 0.120.1 from http://www.jackaudio.org/download'''
308 conf
.check_cc(fragment
= '''
309 #include <jack/jack.h>
310 int main(int argc, char **argv) {
312 jack_latency_range_t r;
313 jack_port_set_latency_range(p, JackCaptureLatency, &r);
317 msg
= 'Checking for new JACK latency API',
320 errmsg
= missing_jack_message
)
322 conf
.check_cc(fragment
= '''
323 #include <jack/jack.h>
324 int main(int argc, char **argv) {
325 jack_port_type_get_buffer_size((jack_client_t*)0, "");
329 msg
= 'Checking for new jack_port_type_get_buffer_size',
332 errmsg
= missing_jack_message
)
335 conf
.define ('HAVE_FLAC', 1)
337 conf
.define ('HAVE_OGG', 1)
339 if conf
.env
['HAVE_LILV'] or conf
.env
['HAVE_SLV2']:
340 conf
.define ('LV2_SUPPORT', 1)
342 conf
.write_config_header('libardour-config.h')
345 autowaf
.check_header(conf
, 'boost/shared_ptr.hpp')
346 autowaf
.check_header(conf
, 'boost/weak_ptr.hpp')
347 autowaf
.check_header(conf
, 'boost/scoped_ptr.hpp')
348 autowaf
.check_header(conf
, 'boost/ptr_container/ptr_list.hpp')
353 obj
= bld
.new_task_gen('cxx', 'shlib')
354 obj
.source
= libardour_sources
355 obj
.export_incdirs
= ['.']
356 obj
.includes
= ['.', '../surfaces/control_protocol', '..']
357 obj
.name
= 'libardour'
358 obj
.target
= 'ardour'
359 obj
.uselib
= ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
360 'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNIT',
361 'OSX','BOOST','CURL','DL']
362 obj
.uselib_local
= ['libpbd','libmidipp','libevoral','libvamphost',
363 'libvampplugin','libtaglib','librubberband',
365 obj
.vnum
= LIBARDOUR_LIB_VERSION
366 obj
.install_path
= os
.path
.join(bld
.env
['LIBDIR'], 'ardour3')
368 'PACKAGE="libardour3"',
369 'DATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"',
370 'CONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"',
371 'MODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"',
372 'LOCALEDIR="' + os
.path
.join(
373 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"',
374 'VAMP_DIR="' + os
.path
.join(
375 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"',
376 'PROGRAM_NAME="' + bld
.env
['PROGRAM_NAME'] + '"'
379 #obj.source += ' st_stretch.cc st_pitch.cc '
380 #obj.uselib += ' SOUNDTOUCH '
381 #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
383 if bld
.env
['HAVE_LILV']:
384 obj
.source
+= [ 'lv2_plugin_lilv.cc', 'lv2_event_buffer.cc',
385 'uri_map.cc', 'rdff.c' ]
386 obj
.uselib
+= ['LILV']
387 if bld
.env
['HAVE_SUIL']:
388 obj
.uselib
+= ['SUIL']
389 elif bld
.env
['HAVE_SLV2']:
390 obj
.source
+= [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
391 'uri_map.cc', 'rdff.c' ]
392 obj
.uselib
+= ['SLV2','RASQAL']
394 if bld
.env
['VST_SUPPORT']:
395 obj
.source
+= [ 'vst_plugin.cc', 'session_vst.cc' ]
396 obj
.includes
+= [ '../fst' ]
397 obj
.cxxflags
+= [ '-DVST_SUPPORT' ]
399 if bld
.env
['COREAUDIO']:
400 obj
.source
+= [ 'coreaudiosource.cc', 'caimportable.cc' ]
401 obj
.uselib_local
+= ['libappleutility']
402 obj
.source
+= [ 'audio_unit.cc' ]
404 if bld
.env
['FPU_OPTIMIZATION']:
405 if (bld
.env
['build_target'] == 'i386'
406 or bld
.env
['build_target'] == 'i686'):
407 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
408 elif bld
.env
['build_target'] == 'x86_64':
409 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
412 if bld
.env
['ENABLE_NLS']:
413 mo_files
= glob
.glob(os
.path
.join(bld
.get_curdir(), 'po/*.mo'))
415 lang
= os
.path
.basename(mo
).replace('.mo', '')
416 bld
.install_as(os
.path
.join(bld
.env
['PREFIX'], 'share', 'locale',
417 lang
, 'LC_MESSAGES', APPNAME
+ '.mo'),
420 if bld
.env
['BUILD_TESTS'] and bld
.env
['HAVE_CPPUNIT']:
422 testobj
= bld
.new_task_gen('cxx', 'program')
425 test/interpolation_test.cpp
426 test/midi_clock_slave_test.cpp
427 test/resampled_source.cc
431 testobj
.includes
= obj
.includes
+ ['test', '../pbd']
432 testobj
.uselib
= ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
433 'SAMPLERATE','XML','LRDF','COREAUDIO']
434 testobj
.uselib_local
= ['libpbd','libmidipp','libardour']
435 testobj
.name
= 'libardour-tests'
436 testobj
.target
= 'run-tests'
437 testobj
.install_path
= ''
439 'PACKAGE="libardour3test"',
440 'DATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"',
441 'CONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"',
442 'MODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"',
443 'LOCALEDIR="' + os
.path
.join(
444 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"',
445 'VAMP_DIR="' + os
.path
.join(
446 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"'
448 if bld
.env
['FPU_OPTIMIZATION']:
449 testobj
.source
+= [ 'sse_functions_xmm.cc' ]
450 if (bld
.env
['build_target'] == 'i386'
451 or bld
.env
['build_target'] == 'i686'):
452 testobj
.source
+= [ 'sse_functions.s' ]
453 elif bld
.env
['build_target'] == 'x86_64':
454 testobj
.source
+= [ 'sse_functions_64bit.s' ]
460 autowaf
.build_i18n (bld
, '..', 'libs/ardour', APPNAME
, libardour_sources
)