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',
127 'midi_playlist_source.cc',
130 'midi_ring_buffer.cc',
132 'midi_state_tracker.cc',
137 'monitor_processor.cc',
141 'named_selection.cc',
144 'pan_controllable.cc',
148 'panner_search_path.cc',
153 'playlist_factory.cc',
154 'playlist_source.cc',
165 'rc_configuration.cc',
166 'recent_sessions.cc',
168 'resampled_source.cc',
174 'route_group_member.cc',
180 'session_command.cc',
181 'session_configuration.cc',
182 'session_directory.cc',
186 'session_metadata.cc',
189 'session_playlists.cc',
190 'session_process.cc',
191 'session_rtevents.cc',
193 'session_state_utils.cc',
195 'session_transport.cc',
199 'sndfile_helpers.cc',
200 'sndfileimportable.cc',
207 'tape_file_matcher.cc',
210 'tempo_map_importer.cc',
214 'transient_detector.cc',
215 'unknown_processor.cc',
221 def flac_supported():
222 cmd
= subprocess
.Popen ("sndfile-info testfile.flac",
223 stdout
= subprocess
.PIPE
,
224 stderr
= subprocess
.STDOUT
, shell
= True)
225 out
= cmd
.communicate()[0].decode('utf-8');
226 return re
.search ('unknown format', out
) == None
229 cmd
= subprocess
.Popen ("sndfile-info testfile.ogg",
230 stdout
= subprocess
.PIPE
,
231 stderr
= subprocess
.STDOUT
, shell
= True)
232 out
= cmd
.communicate()[0].decode('utf-8');
233 return re
.search ('unknown format', out
) == None
235 def set_options(opt
):
236 autowaf
.set_options(opt
)
239 autowaf
.build_version_files(
240 path_prefix
+ 'ardour/version.h',
241 path_prefix
+ 'version.cc',
242 'libardour3', MAJOR
, MINOR
, MICRO
)
243 autowaf
.configure(conf
)
244 conf
.check_tool('compiler_cxx gas')
245 autowaf
.check_pkg(conf
, 'aubio', uselib_store
='AUBIO',
246 atleast_version
='0.3.2')
247 autowaf
.check_pkg(conf
, 'jack', uselib_store
='JACK',
248 atleast_version
='0.118.2')
249 autowaf
.check_pkg(conf
, 'libxml-2.0', uselib_store
='XML')
250 autowaf
.check_pkg(conf
, 'lrdf', uselib_store
='LRDF',
251 atleast_version
='0.4.0')
252 autowaf
.check_pkg(conf
, 'samplerate', uselib_store
='SAMPLERATE',
253 atleast_version
='0.1.0')
254 autowaf
.check_pkg(conf
, 'sigc++-2.0', uselib_store
='SIGCPP',
255 atleast_version
='2.0')
256 autowaf
.check_pkg(conf
, 'lilv-0', uselib_store
='LILV',
257 atleast_version
='0.0.0', mandatory
=False)
258 if conf
.env
['HAVE_LILV']:
259 autowaf
.check_pkg(conf
, 'suil-0', uselib_store
='SUIL',
260 atleast_version
='0.2.0', mandatory
=False)
262 autowaf
.check_pkg(conf
, 'slv2', uselib_store
='SLV2',
263 atleast_version
='0.6.4', mandatory
=False)
264 if conf
.env
['HAVE_SLV2']:
265 autowaf
.check_pkg(conf
, 'rasqal', uselib_store
='RASQAL',
266 atleast_version
='0.9.14', mandatory
=False)
267 autowaf
.check_pkg(conf
, 'soundtouch-1.0', uselib_store
='SOUNDTOUCH',
269 autowaf
.check_pkg(conf
, 'cppunit', uselib_store
='CPPUNIT',
270 atleast_version
='1.12.0', mandatory
=False)
271 autowaf
.check_pkg(conf
, 'ogg', uselib_store
='OGG', atleast_version
='1.1.2')
272 autowaf
.check_pkg(conf
, 'flac', uselib_store
='FLAC',
273 atleast_version
='1.2.1')
274 autowaf
.check_pkg(conf
, 'libcurl', uselib_store
='CURL',
275 atleast_version
='7.0.0')
277 # we don't try to detect this, since its part of our source tree
279 conf
.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
280 conf
.define('USE_RUBBERBAND', 1) # controls whether we actually use it
282 conf
.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION
)
284 conf
.check(header_name
='sys/vfs.h', define_name
='HAVE_SYS_VFS_H')
285 conf
.check(header_name
='wordexp.h', define_name
='HAVE_WORDEXP')
287 conf
.check(header_name
='jack/session.h', uselib
= [ 'JACK' ],
288 define_name
='HAVE_JACK_SESSION')
290 conf
.check(header_name
='unistd.h', define_name
='HAVE_UNISTD')
292 conf
.check_cc(fragment
= '''
293 #include <jack/jack.h>
294 void callback(int code, const char* reason, void* arg) { return; }
295 int main(int argc, char **argv) {
297 jack_on_info_shutdown(c, callback, (void*) 0);
301 msg
= 'Checking for jack_on_info_shutdown',
302 define_name
= 'HAVE_JACK_ON_INFO_SHUTDOWN',
305 missing_jack_message
= '''missing - a version of JACK that supports \
306 jack_port_set_latency_range() is required to compile Ardour3. Currently this\
307 means using JACK version 0.120.1 from http://www.jackaudio.org/download'''
309 conf
.check_cc(fragment
= '''
310 #include <jack/jack.h>
311 int main(int argc, char **argv) {
313 jack_latency_range_t r;
314 jack_port_set_latency_range(p, JackCaptureLatency, &r);
318 msg
= 'Checking for new JACK latency API',
321 errmsg
= missing_jack_message
)
323 conf
.check_cc(fragment
= '''
324 #include <jack/jack.h>
325 int main(int argc, char **argv) {
326 jack_port_type_get_buffer_size((jack_client_t*)0, "");
330 msg
= 'Checking for new jack_port_type_get_buffer_size',
333 errmsg
= missing_jack_message
)
336 conf
.define ('HAVE_FLAC', 1)
338 conf
.define ('HAVE_OGG', 1)
340 if conf
.env
['HAVE_LILV'] or conf
.env
['HAVE_SLV2']:
341 conf
.define ('LV2_SUPPORT', 1)
343 conf
.write_config_header('libardour-config.h')
346 autowaf
.check_header(conf
, 'boost/shared_ptr.hpp')
347 autowaf
.check_header(conf
, 'boost/weak_ptr.hpp')
348 autowaf
.check_header(conf
, 'boost/scoped_ptr.hpp')
349 autowaf
.check_header(conf
, 'boost/ptr_container/ptr_list.hpp')
354 obj
= bld
.new_task_gen('cxx', 'shlib')
355 obj
.source
= libardour_sources
356 obj
.export_incdirs
= ['.']
357 obj
.includes
= ['.', '../surfaces/control_protocol', '..']
358 obj
.name
= 'libardour'
359 obj
.target
= 'ardour'
360 obj
.uselib
= ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
361 'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNIT',
362 'OSX','BOOST','CURL','DL']
363 obj
.uselib_local
= ['libpbd','libmidipp','libevoral','libvamphost',
364 'libvampplugin','libtaglib','librubberband',
366 obj
.vnum
= LIBARDOUR_LIB_VERSION
367 obj
.install_path
= os
.path
.join(bld
.env
['LIBDIR'], 'ardour3')
369 'PACKAGE="libardour3"',
370 'DATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"',
371 'CONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"',
372 'MODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"',
373 'LOCALEDIR="' + os
.path
.join(
374 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"',
375 'VAMP_DIR="' + os
.path
.join(
376 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"',
377 'PROGRAM_NAME="' + bld
.env
['PROGRAM_NAME'] + '"'
380 #obj.source += ' st_stretch.cc st_pitch.cc '
381 #obj.uselib += ' SOUNDTOUCH '
382 #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
384 if bld
.env
['HAVE_LILV']:
385 obj
.source
+= [ 'lv2_plugin_lilv.cc', 'lv2_event_buffer.cc',
386 'uri_map.cc', 'rdff.c' ]
387 obj
.uselib
+= ['LILV']
388 if bld
.env
['HAVE_SUIL']:
389 obj
.uselib
+= ['SUIL']
390 elif bld
.env
['HAVE_SLV2']:
391 obj
.source
+= [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
392 'uri_map.cc', 'rdff.c' ]
393 obj
.uselib
+= ['SLV2','RASQAL']
395 if bld
.env
['VST_SUPPORT']:
396 obj
.source
+= [ 'vst_plugin.cc', 'session_vst.cc' ]
397 obj
.includes
+= [ '../fst' ]
398 obj
.defines
+= [ 'VST_SUPPORT' ]
400 if bld
.env
['COREAUDIO']:
401 obj
.source
+= [ 'coreaudiosource.cc', 'caimportable.cc' ]
402 obj
.uselib_local
+= ['libappleutility']
403 obj
.source
+= [ 'audio_unit.cc' ]
405 if bld
.env
['FPU_OPTIMIZATION']:
406 if (bld
.env
['build_target'] == 'i386'
407 or bld
.env
['build_target'] == 'i686'):
408 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
409 elif bld
.env
['build_target'] == 'x86_64':
410 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
413 if bld
.env
['ENABLE_NLS']:
414 mo_files
= glob
.glob(os
.path
.join(bld
.get_curdir(), 'po/*.mo'))
416 lang
= os
.path
.basename(mo
).replace('.mo', '')
417 bld
.install_as(os
.path
.join(bld
.env
['PREFIX'], 'share', 'locale',
418 lang
, 'LC_MESSAGES', 'libardour3.mo'),
421 if bld
.env
['BUILD_TESTS'] and bld
.env
['HAVE_CPPUNIT']:
423 testobj
= bld
.new_task_gen('cxx', 'program')
426 test/interpolation_test.cpp
427 test/midi_clock_slave_test.cpp
428 test/resampled_source.cc
432 testobj
.includes
= obj
.includes
+ ['test', '../pbd']
433 testobj
.uselib
= ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
434 'SAMPLERATE','XML','LRDF','COREAUDIO']
435 testobj
.uselib_local
= ['libpbd','libmidipp','libardour']
436 testobj
.name
= 'libardour-tests'
437 testobj
.target
= 'run-tests'
438 testobj
.install_path
= ''
440 'PACKAGE="libardour3test"',
441 'DATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"',
442 'CONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"',
443 'MODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"',
444 'LOCALEDIR="' + os
.path
.join(
445 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"',
446 'VAMP_DIR="' + os
.path
.join(
447 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"'
449 if bld
.env
['FPU_OPTIMIZATION']:
450 testobj
.source
+= [ 'sse_functions_xmm.cc' ]
451 if (bld
.env
['build_target'] == 'i386'
452 or bld
.env
['build_target'] == 'i686'):
453 testobj
.source
+= [ 'sse_functions.s' ]
454 elif bld
.env
['build_target'] == 'x86_64':
455 testobj
.source
+= [ 'sse_functions_64bit.s' ]
461 autowaf
.build_i18n (bld
, '.', 'libs/ardour', APPNAME
, libardour_sources
)