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',
43 'audio_region_importer.cc',
45 'audio_track_importer.cc',
48 'audiofile_tagger.cc',
55 'automation_control.cc',
57 'beats_frames_converter.cc',
65 'capturing_processor.cc',
70 'control_protocol_manager.cc',
71 'control_protocol_search_path.cc',
79 'element_import_handler.cc',
80 'element_importer.cc',
84 'export_channel_configuration.cc',
87 'export_format_base.cc',
88 'export_format_manager.cc',
89 'export_format_specification.cc',
91 'export_formats_search_path.cc',
92 'export_graph_builder.cc',
95 'export_profile_manager.cc',
99 'filename_extensions.cc',
100 'filesystem_paths.cc',
108 'internal_return.cc',
116 'location_importer.cc',
118 'midi_automation_list_binder.cc',
120 'midi_clock_slave.cc',
121 'midi_diskstream.cc',
123 'midi_patch_manager.cc',
127 'midi_ring_buffer.cc',
129 'midi_state_tracker.cc',
134 'monitor_processor.cc',
138 'named_selection.cc',
141 'pan_controllable.cc',
145 'panner_search_path.cc',
150 'playlist_factory.cc',
161 'rc_configuration.cc',
162 'recent_sessions.cc',
164 'resampled_source.cc',
170 'route_group_member.cc',
176 'session_command.cc',
177 'session_configuration.cc',
178 'session_directory.cc',
182 'session_metadata.cc',
185 'session_playlists.cc',
186 'session_process.cc',
187 'session_rtevents.cc',
189 'session_state_utils.cc',
191 'session_transport.cc',
195 'sndfile_helpers.cc',
196 'sndfileimportable.cc',
203 'tape_file_matcher.cc',
206 'tempo_map_importer.cc',
210 'transient_detector.cc',
211 'unknown_processor.cc',
217 def flac_supported():
218 cmd = subprocess.Popen ("sndfile-info testfile.flac",
219 stdout = subprocess.PIPE,
220 stderr = subprocess.STDOUT, shell = True)
221 out = cmd.communicate()[0].decode('utf-8');
222 return re.search ('unknown format', out) == None
225 cmd = subprocess.Popen ("sndfile-info testfile.ogg",
226 stdout = subprocess.PIPE,
227 stderr = subprocess.STDOUT, shell = True)
228 out = cmd.communicate()[0].decode('utf-8');
229 return re.search ('unknown format', out) == None
231 def set_options(opt):
232 autowaf.set_options(opt)
235 autowaf.build_version_files(path_prefix+'ardour/version.h', path_prefix+'version.cc',
236 'libardour3', MAJOR, MINOR, MICRO)
237 autowaf.configure(conf)
238 conf.check_tool('compiler_cxx gas')
239 autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', atleast_version='0.3.2')
240 autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.118.2')
241 autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
242 autowaf.check_pkg(conf, 'lrdf', uselib_store='LRDF', atleast_version='0.4.0')
243 autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE', atleast_version='0.1.0')
244 autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
245 autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2', atleast_version='0.6.4', mandatory=False)
246 autowaf.check_pkg(conf, 'slv2', uselib_store='NEW_SLV2', atleast_version='0.7.0', mandatory=False)
247 autowaf.check_pkg(conf, 'suil', uselib_store='SUIL', atleast_version='0.1.0', mandatory=False)
248 autowaf.check_pkg(conf, 'rasqal', uselib_store='RASQAL', atleast_version='0.9.14', mandatory=False)
249 autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH', mandatory=False)
250 autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
251 autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
252 autowaf.check_pkg(conf, 'flac', uselib_store='FLAC', atleast_version='1.2.1')
253 autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0')
255 # we don't try to detect this, since its part of our source tree
257 conf.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
258 conf.define('USE_RUBBERBAND', 1) # controls whether we actually use it
260 conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
262 conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H')
263 conf.check(header_name='wordexp.h', define_name='HAVE_WORDEXP')
265 conf.check(header_name='jack/session.h', uselib = [ 'JACK' ], define_name='HAVE_JACK_SESSION')
267 conf.check(header_name='unistd.h', define_name='HAVE_UNISTD')
269 conf.check_cc(fragment = "#include <jack/jack.h>\nvoid callback (int code, const char* reason, void* arg) { return; }\nint main(int argc, char **argv) { jack_client_t* c; jack_on_info_shutdown (c, callback, (void*) 0); return 0; }\n",
271 msg = 'Checking for jack_on_info_shutdown',
272 define_name = 'HAVE_JACK_ON_INFO_SHUTDOWN',
275 missing_jack_message = 'missing - a version of JACK that supports jack_port_set_latency_range() is required to compile Ardour3\nCurrently this means using JACK version 0.120.1 from http://www.jackaudio.org/download\n'
277 conf.check_cc(fragment = "#include <jack/jack.h>\nint main(int argc, char **argv) { jack_port_t* p; jack_latency_range_t r; jack_port_set_latency_range (p, JackCaptureLatency, &r); return 0; }\n",
279 msg = 'Checking for new JACK latency API',
282 errmsg = missing_jack_message)
284 conf.check_cc(fragment = '#include <jack/jack.h>\nint main(int argc, char **argv) { jack_port_type_get_buffer_size ((jack_client_t*)0, ""); }\n',
286 msg = 'Checking for new jack_port_type_get_buffer_size',
289 errmsg = missing_jack_message)
292 conf.define ('HAVE_FLAC', 1)
294 conf.define ('HAVE_OGG', 1)
296 conf.write_config_header('libardour-config.h')
299 autowaf.check_header(conf, 'boost/shared_ptr.hpp')
300 autowaf.check_header(conf, 'boost/weak_ptr.hpp')
301 autowaf.check_header(conf, 'boost/scoped_ptr.hpp')
302 autowaf.check_header(conf, 'boost/ptr_container/ptr_list.hpp')
307 obj = bld.new_task_gen('cxx', 'shlib')
308 obj.source = libardour_sources
309 obj.export_incdirs = ['.']
310 obj.includes = ['.', '../surfaces/control_protocol', '..']
311 obj.name = 'libardour'
312 obj.target = 'ardour'
313 obj.uselib = 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF AUDIOUNIT OSX BOOST CURL DL'
314 obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband libaudiographer'
315 obj.vnum = LIBARDOUR_LIB_VERSION
316 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
317 obj.cxxflags = ['-DPACKAGE="libardour3"']
318 obj.cxxflags += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"']
319 obj.cxxflags += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"']
320 obj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
321 obj.cxxflags += ['-DLOCALEDIR="' + os.path.join(
322 os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
323 obj.cxxflags += ['-DVAMP_DIR="' + os.path.join(
324 os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"']
325 obj.cxxflags += ['-DPROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"']
327 #obj.source += ' st_stretch.cc st_pitch.cc '
328 #obj.uselib += ' SOUNDTOUCH '
329 #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
331 if bld.env['HAVE_SLV2']:
332 obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc', 'uri_map.cc', 'rdff.c' ]
333 obj.uselib += ' SLV2 ' + ' RASQAL '
334 if bld.env['HAVE_SUIL']:
335 obj.uselib += ' SUIL '
337 if bld.env['VST_SUPPORT']:
338 obj.source += [ 'vst_plugin.cc', 'session_vst.cc' ]
339 obj.includes += [ '../fst' ]
340 obj.cxxflags += [ '-DVST_SUPPORT' ]
342 if bld.env['COREAUDIO']:
343 obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
344 obj.uselib_local += ' libappleutility'
345 obj.source += [ 'audio_unit.cc' ]
347 if bld.env['FPU_OPTIMIZATION']:
348 if bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686':
349 obj.source += [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
350 elif bld.env['build_target'] == 'x86_64':
351 obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
354 if bld.env['ENABLE_NLS']:
355 mo_files = glob.glob (os.path.join (bld.get_curdir(), 'po/*.mo'))
357 lang = os.path.basename (mo).replace ('.mo', '')
358 bld.install_as (os.path.join (bld.env['PREFIX'], 'share', 'locale', lang, 'LC_MESSAGES', APPNAME + '.mo'), mo)
360 if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
362 testobj = bld.new_task_gen('cxx', 'program')
365 test/interpolation_test.cpp
366 test/midi_clock_slave_test.cpp
367 test/resampled_source.cc
371 testobj.includes = obj.includes + ['test', '../pbd']
372 testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF COREAUDIO'
373 testobj.uselib_local = 'libpbd libmidipp libardour'
374 testobj.name = 'libardour-tests'
375 testobj.target = 'run-tests'
376 testobj.install_path = ''
377 testobj.cxxflags = ['-DPACKAGE="libardour3test"']
378 testobj.cxxflags += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"']
379 testobj.cxxflags += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"']
380 testobj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
381 testobj.cxxflags += ['-DLOCALEDIR="' + os.path.join(
382 os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
383 testobj.cxxflags += ['-DVAMP_DIR="' + os.path.join(
384 os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"']
385 if bld.env['FPU_OPTIMIZATION']:
386 testobj.source += [ 'sse_functions_xmm.cc' ]
387 if bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686':
388 testobj.source += [ 'sse_functions.s' ]
389 elif bld.env['build_target'] == 'x86_64':
390 testobj.source += [ 'sse_functions_64bit.s' ]
396 autowaf.build_i18n (bld, '..', 'libs/ardour', APPNAME, libardour_sources)