+ obj.env.append_value('LINKFLAGS', 'default/libs/surfaces/control_protocol/smpte_1.o')
+ #
+ # TODO: The above is an ugly hack that shouldn't be needed. We really need
+ # to refactor SMPTE out of libardour_cp to get rid of that circular dependency
+ # alltogether.
+ #
+ if bld.env['HAVE_SLV2']:
+ obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc', 'uri_map.cc' ]
+ obj.uselib += ' SLV2 '
+
+ if bld.env['VST']:
+ obj.source += [ 'vst_plugin.cc', 'session_vst.cc' ]
+
+ if bld.env['HAVE_COREAUDIO'] and bld.env['COREAUDIO']:
+ obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
+
+ if bld.env['HAVE_AUDIOUNITS'] or bld.env['HAVE_COREAUDIO']:
+ obj.uselib_local += ' libappleutility'
+
+ if bld.env['HAVE_AUDIOUNITS'] and bld.env['AUDIOUNITS']:
+ obj.source += [ 'audio_unit.cc' ]
+
+ if bld.env['FPU_OPTIMIZATION']:
+ if bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686':
+ 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
+ if bld.env['ENABLE_NLS']:
+ mo_files = glob.glob (os.path.join (bld.get_curdir(), 'po/*.mo'))
+ for mo in mo_files:
+ lang = os.path.basename (mo).replace ('.mo', '')
+ bld.install_as (os.path.join (bld.env['PREFIX'], 'share', 'locale', lang, 'LC_MESSAGES', APPNAME + '.mo'), mo)
+
+ if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+ # Unit tests
+ testobj = bld.new_task_gen('cxx', 'program')
+ testobj.source = '''
+ test/bbt_test.cpp
+ test/interpolation_test.cpp
+ test/midi_clock_slave_test.cpp
+ test/resampled_source.cc
+ test/testrunner.cpp
+ '''.split()
+ testobj.includes = obj.includes + ['test', '../pbd']
+ testobj.uselib = 'CPPUNIT SIGCPP JACK GLIBMM GTHREAD SAMPLERATE XML LRDF COREAUDIO'
+ testobj.uselib_local = 'libpbd libmidipp libardour'
+ testobj.name = 'libardour-tests'
+ testobj.target = 'run-tests'
+ testobj.install_path = ''
+ testobj.cxxflags = ['-DPACKAGE="libardour3test"']
+ testobj.cxxflags += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"']
+ testobj.cxxflags += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"']
+ testobj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
+ testobj.cxxflags += ['-DLOCALEDIR="' + os.path.join(
+ os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
+ testobj.cxxflags += ['-DVAMP_DIR="' + os.path.join(
+ os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"']
+ if bld.env['FPU_OPTIMIZATION']:
+ testobj.source += [ 'sse_functions_xmm.cc' ]
+ if bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686':
+ testobj.source += [ 'sse_functions.s' ]
+ elif bld.env['build_target'] == 'x86_64':
+ testobj.source += [ 'sse_functions_64bit.s' ]
+