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',
68 'control_protocol_manager.cc',
69 'control_protocol_search_path.cc',
77 'element_import_handler.cc',
78 'element_importer.cc',
82 'export_channel_configuration.cc',
85 'export_format_base.cc',
86 'export_format_manager.cc',
87 'export_format_specification.cc',
89 'export_graph_builder.cc',
92 'export_profile_manager.cc',
96 'filename_extensions.cc',
97 'filesystem_paths.cc',
105 'internal_return.cc',
113 'location_importer.cc',
116 'midi_clock_slave.cc',
117 'midi_diskstream.cc',
119 'midi_patch_manager.cc',
123 'midi_ring_buffer.cc',
125 'midi_state_tracker.cc',
130 'monitor_processor.cc',
134 'named_selection.cc',
140 'playlist_factory.cc',
150 'rc_configuration.cc',
151 'recent_sessions.cc',
153 'resampled_source.cc',
159 'route_group_member.cc',
165 'session_command.cc',
166 'session_configuration.cc',
167 'session_directory.cc',
171 'session_metadata.cc',
174 'session_playlists.cc',
175 'session_process.cc',
176 'session_rtevents.cc',
178 'session_state_utils.cc',
180 'session_transport.cc',
184 'sndfile_helpers.cc',
185 'sndfileimportable.cc',
191 'tape_file_matcher.cc',
194 'tempo_map_importer.cc',
198 'transient_detector.cc',
204 def flac_supported():
205 cmd
= subprocess
.Popen ("sndfile-info testfile.flac",
206 stdout
= subprocess
.PIPE
,
207 stderr
= subprocess
.STDOUT
, shell
= True)
208 out
= cmd
.communicate()[0];
209 return re
.search ('unknown format', out
) == None
212 cmd
= subprocess
.Popen ("sndfile-info testfile.ogg",
213 stdout
= subprocess
.PIPE
,
214 stderr
= subprocess
.STDOUT
, shell
= True)
215 out
= cmd
.communicate()[0];
216 return re
.search ('unknown format', out
) == None
218 def set_options(opt
):
219 autowaf
.set_options(opt
)
222 autowaf
.build_version_files(path_prefix
+'ardour/version.h', path_prefix
+'version.cc',
223 'libardour3', MAJOR
, MINOR
, MICRO
)
224 autowaf
.configure(conf
)
225 conf
.check_tool('compiler_cxx gas')
226 autowaf
.check_pkg(conf
, 'aubio', uselib_store
='AUBIO', atleast_version
='0.3.2')
227 autowaf
.check_pkg(conf
, 'jack', uselib_store
='JACK', atleast_version
='0.118.2')
228 autowaf
.check_pkg(conf
, 'libxml-2.0', uselib_store
='XML')
229 autowaf
.check_pkg(conf
, 'lrdf', uselib_store
='LRDF', atleast_version
='0.4.0')
230 autowaf
.check_pkg(conf
, 'samplerate', uselib_store
='SAMPLERATE', atleast_version
='0.1.0')
231 autowaf
.check_pkg(conf
, 'sigc++-2.0', uselib_store
='SIGCPP', atleast_version
='2.0')
232 autowaf
.check_pkg(conf
, 'slv2', uselib_store
='SLV2', atleast_version
='0.6.4', mandatory
=False)
233 autowaf
.check_pkg(conf
, 'sndfile', uselib_store
='SNDFILE', atleast_version
='1.0.18')
234 autowaf
.check_pkg(conf
, 'soundtouch-1.0', uselib_store
='SOUNDTOUCH', mandatory
=False)
235 autowaf
.check_pkg(conf
, 'cppunit', uselib_store
='CPPUNIT', atleast_version
='1.12.0', mandatory
=False)
236 autowaf
.check_pkg(conf
, 'ogg', uselib_store
='OGG', atleast_version
='1.1.2')
237 autowaf
.check_pkg(conf
, 'flac', uselib_store
='FLAC', atleast_version
='1.2.1')
239 # we don't try to detect this, since its part of our source tree
241 conf
.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
242 conf
.define('USE_RUBBERBAND', 1) # controls whether we actually use it
244 conf
.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION
)
246 conf
.check(header_name
='sys/vfs.h', define_name
='HAVE_SYS_VFS_H')
247 conf
.check(header_name
='wordexp.h', define_name
='HAVE_WORDEXP')
249 conf
.check(header_name
='jack/session.h', define_name
='HAVE_JACK_SESSION')
251 conf
.check(header_name
='unistd.h', define_name
='HAVE_UNISTD')
253 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",
254 linkflags
= ['-ljack'],
255 msg
= 'Checking for jack_on_info_shutdown',
256 define_name
= 'HAVE_JACK_ON_INFO_SHUTDOWN',
260 conf
.define ('HAVE_FLAC', 1)
261 autowaf
.display_msg(conf
, 'Checking for FLAC support', True)
263 autowaf
.display_msg(conf
, 'Checking for FLAC support', False)
265 conf
.define ('HAVE_OGG', 1)
266 autowaf
.display_msg(conf
, 'Checking for Ogg/Vorbis support', True)
268 autowaf
.display_msg(conf
, 'Checking for Ogg/Vorbis Support', False)
270 conf
.write_config_header('libardour-config.h')
273 autowaf
.check_header(conf
, 'boost/shared_ptr.hpp')
274 autowaf
.check_header(conf
, 'boost/weak_ptr.hpp')
275 autowaf
.check_header(conf
, 'boost/scoped_ptr.hpp')
276 autowaf
.check_header(conf
, 'boost/ptr_container/ptr_list.hpp')
281 obj
= bld
.new_task_gen('cxx', 'shlib')
282 obj
.source
= libardour_sources
283 obj
.export_incdirs
= ['.']
284 obj
.includes
= ['.', '../surfaces/control_protocol', '..']
285 obj
.name
= 'libardour'
286 obj
.target
= 'ardour'
287 obj
.uselib
= 'GLIBMM GTHREAD AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF OSX COREAUDIO'
288 obj
.uselib_local
= 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband libaudiographer'
289 obj
.vnum
= LIBARDOUR_LIB_VERSION
290 obj
.install_path
= os
.path
.join(bld
.env
['LIBDIR'], 'ardour3')
291 obj
.cxxflags
= ['-DPACKAGE="libardour3"']
292 obj
.cxxflags
+= ['-DDATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"']
293 obj
.cxxflags
+= ['-DCONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"']
294 obj
.cxxflags
+= ['-DMODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"']
295 obj
.cxxflags
+= ['-DLOCALEDIR="' + os
.path
.join(
296 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"']
297 obj
.cxxflags
+= ['-DVAMP_DIR="' + os
.path
.join(
298 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"']
299 obj
.cxxflags
+= ['-DPROGRAM_NAME="' + bld
.env
['PROGRAM_NAME'] + '"']
301 #obj.source += ' st_stretch.cc st_pitch.cc '
302 #obj.uselib += ' SOUNDTOUCH '
303 #obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
305 obj
.env
.append_value('LINKFLAGS', 'default/libs/surfaces/control_protocol/smpte_1.o')
307 # TODO: The above is an ugly hack that shouldn't be needed. We really need
308 # to refactor SMPTE out of libardour_cp to get rid of that circular dependency
311 if bld
.env
['HAVE_SLV2']:
312 obj
.source
+= [ 'lv2_plugin.cc', 'lv2_event_buffer.cc', 'uri_map.cc' ]
313 obj
.uselib
+= ' SLV2 '
316 obj
.source
+= [ 'vst_plugin.cc', 'session_vst.cc' ]
318 if bld
.env
['HAVE_COREAUDIO'] and bld
.env
['COREAUDIO']:
319 obj
.source
+= [ 'coreaudiosource.cc', 'caimportable.cc' ]
321 if bld
.env
['HAVE_AUDIOUNITS'] or bld
.env
['HAVE_COREAUDIO']:
322 obj
.uselib_local
+= ' libappleutility'
324 if bld
.env
['HAVE_AUDIOUNITS'] and bld
.env
['AUDIOUNITS']:
325 obj
.source
+= [ 'audio_unit.cc' ]
327 if bld
.env
['FPU_OPTIMIZATION']:
328 if bld
.env
['build_target'] == 'i386' or bld
.env
['build_target'] == 'i686':
329 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
330 elif bld
.env
['build_target'] == 'x86_64':
331 obj
.source
+= [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
334 if bld
.env
['ENABLE_NLS']:
335 mo_files
= glob
.glob (os
.path
.join (bld
.get_curdir(), 'po/*.mo'))
337 lang
= os
.path
.basename (mo
).replace ('.mo', '')
338 bld
.install_as (os
.path
.join (bld
.env
['PREFIX'], 'share', 'locale', lang
, 'LC_MESSAGES', APPNAME
+ '.mo'), mo
)
340 if bld
.env
['BUILD_TESTS'] and bld
.env
['HAVE_CPPUNIT']:
342 testobj
= bld
.new_task_gen('cxx', 'program')
345 test/interpolation_test.cpp
346 test/midi_clock_slave_test.cpp
347 test/resampled_source.cc
350 testobj
.includes
= obj
.includes
+ ['test', '../pbd']
351 testobj
.uselib
= 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF COREAUDIO'
352 testobj
.uselib_local
= 'libpbd libmidipp libardour'
353 testobj
.name
= 'libardour-tests'
354 testobj
.target
= 'run-tests'
355 testobj
.install_path
= ''
356 testobj
.cxxflags
= ['-DPACKAGE="libardour3test"']
357 testobj
.cxxflags
+= ['-DDATA_DIR="' + os
.path
.normpath(bld
.env
['DATADIR']) + '"']
358 testobj
.cxxflags
+= ['-DCONFIG_DIR="' + os
.path
.normpath(bld
.env
['CONFIGDIR']) + '"']
359 testobj
.cxxflags
+= ['-DMODULE_DIR="' + os
.path
.normpath(bld
.env
['LIBDIR']) + '"']
360 testobj
.cxxflags
+= ['-DLOCALEDIR="' + os
.path
.join(
361 os
.path
.normpath(bld
.env
['DATADIR']), 'locale') + '"']
362 testobj
.cxxflags
+= ['-DVAMP_DIR="' + os
.path
.join(
363 os
.path
.normpath(bld
.env
['LIBDIR']), 'ardour3', 'vamp') + '"']
364 if bld
.env
['FPU_OPTIMIZATION']:
365 testobj
.source
+= [ 'sse_functions_xmm.cc' ]
366 if bld
.env
['build_target'] == 'i386' or bld
.env
['build_target'] == 'i686':
367 testobj
.source
+= [ 'sse_functions.s' ]
368 elif bld
.env
['build_target'] == 'x86_64':
369 testobj
.source
+= [ 'sse_functions_64bit.s' ]
375 autowaf
.build_i18n (bld
, 'libs/ardour', APPNAME
, libardour_sources
)