2014-02-24 14:39:10 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
from waflib.extras import autowaf as autowaf
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import re
|
|
|
|
|
|
|
|
I18N_PACKAGE = 'wavesaudio-backend'
|
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
2014-04-30 13:46:41 -04:00
|
|
|
if conf.options.dist_target == 'mingw':
|
|
|
|
autowaf.check_pkg(conf, 'portaudio-2.0', uselib_store='PORTAUDIO',
|
|
|
|
atleast_version='19')
|
2014-02-24 14:39:10 -05:00
|
|
|
autowaf.configure(conf)
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-02-24 14:39:10 -05:00
|
|
|
def build(bld):
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-04-30 13:46:41 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
2014-05-20 20:25:45 -04:00
|
|
|
obj = bld(features = 'cxx cxxshlib')
|
2014-02-24 14:39:10 -05:00
|
|
|
else:
|
2014-10-02 18:46:34 -04:00
|
|
|
obj = bld(features = 'c cxx cxxshlib')
|
|
|
|
|
2014-06-25 12:30:57 -04:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
if bld.env['build_target'] not in [ 'lion' ]:
|
|
|
|
obj.framework = 'CoreMidi'
|
|
|
|
else:
|
|
|
|
obj.framework = 'CoreMIDI'
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-02-24 14:39:10 -05:00
|
|
|
obj.source = [
|
|
|
|
'waves_audiobackend.cc',
|
|
|
|
'waves_audiobackend.latency.cc',
|
|
|
|
'waves_audiobackend.midi.cc',
|
|
|
|
'waves_audiobackend.port_engine.cc',
|
|
|
|
'waves_dataport.cc',
|
|
|
|
'waves_audioport.cc',
|
|
|
|
'waves_midiport.cc',
|
|
|
|
'waves_midi_device_manager.cc',
|
|
|
|
'waves_midi_device.cc',
|
|
|
|
'waves_midi_event.cc',
|
|
|
|
'waves_midi_buffer.cc',
|
|
|
|
'wavesapi/refmanager/WCRefManager.cpp',
|
|
|
|
'wavesapi/devicemanager/WCMRAudioDeviceManager.cpp',
|
|
|
|
'wavesapi/devicemanager/WCMRNativeAudio.cpp',
|
2014-09-30 22:02:30 -04:00
|
|
|
'wavesapi/Threads/WCThreadSafe.cpp',
|
2014-05-20 20:25:45 -04:00
|
|
|
'portmidi/src/pm_common/pmutil.c',
|
|
|
|
'portmidi/src/pm_common/portmidi.c'
|
2014-02-24 14:39:10 -05:00
|
|
|
]
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-04-30 13:46:41 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
2014-05-20 20:25:45 -04:00
|
|
|
platform_dependent = [
|
2014-09-30 22:02:30 -04:00
|
|
|
'wavesapi/MiscUtils/UMicroseconds.cpp',
|
2014-05-20 20:25:45 -04:00
|
|
|
'wavesapi/devicemanager/WCMRPortAudioDeviceManager.cpp',
|
|
|
|
'portmidi/src/pm_win/pmwin.c',
|
|
|
|
'portmidi/src/pm_win/pmwinmm.c',
|
|
|
|
'portmidi/src/porttime/ptwinmm.c'
|
|
|
|
]
|
2014-04-30 13:46:41 -04:00
|
|
|
else:
|
2014-05-20 20:25:45 -04:00
|
|
|
platform_dependent = [
|
|
|
|
'wavesapi/devicemanager/WCMRCoreAudioDeviceManager.cpp',
|
|
|
|
'portmidi/src/pm_mac/pmmac.c',
|
|
|
|
'portmidi/src/pm_mac/pmmacosxcm.c',
|
|
|
|
'portmidi/src/pm_mac/finddefault.c',
|
|
|
|
'portmidi/src/pm_mac/readbinaryplist.c',
|
|
|
|
'portmidi/src/porttime/ptmacosx_mach.c'
|
|
|
|
]
|
|
|
|
|
2014-04-30 13:46:41 -04:00
|
|
|
obj.source.extend(platform_dependent)
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-02-24 14:39:10 -05:00
|
|
|
obj.includes = ['.',
|
2014-05-20 20:25:45 -04:00
|
|
|
'wavesapi',
|
|
|
|
'wavesapi/refmanager',
|
2014-09-30 22:02:30 -04:00
|
|
|
'wavesapi/WavesPublicAPI',
|
2014-05-20 20:25:45 -04:00
|
|
|
'wavesapi/devicemanager',
|
2014-09-30 22:02:30 -04:00
|
|
|
'wavesapi/MiscUtils',
|
|
|
|
'wavesapi/Threads',
|
2014-05-20 20:25:45 -04:00
|
|
|
'portmidi',
|
|
|
|
'portmidi/src/pm_common'
|
|
|
|
]
|
|
|
|
|
2014-02-24 14:39:10 -05:00
|
|
|
obj.name = 'waves_audiobackend'
|
|
|
|
obj.target = 'waves_audiobackend'
|
2014-04-30 13:46:41 -04:00
|
|
|
obj.use = 'libardour libpbd'
|
|
|
|
if bld.env['build_target'] == 'mingw':
|
2014-10-02 18:46:34 -04:00
|
|
|
obj.uselib = ['PORTAUDIO']
|
2015-05-13 22:20:38 -04:00
|
|
|
obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
|
|
|
|
obj.cflags = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c-anonymous-union'] ]
|
2015-03-11 09:58:02 -04:00
|
|
|
else:
|
2015-05-13 22:20:38 -04:00
|
|
|
obj.cflags = [ bld.env['compiler_flags_dict']['c-anonymous-union'] ]
|
2014-05-01 10:18:30 -04:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends')
|
2014-05-20 20:25:45 -04:00
|
|
|
|
2014-04-30 13:46:41 -04:00
|
|
|
if bld.env['build_target']== 'mingw':
|
2014-05-20 20:25:45 -04:00
|
|
|
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
|
|
|
|
'ARDOURBACKEND_DLL_EXPORTS'
|
|
|
|
]
|
2014-04-30 13:46:41 -04:00
|
|
|
else:
|
2014-05-20 20:25:45 -04:00
|
|
|
obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
|
|
|
|
'ARDOURBACKEND_DLL_EXPORTS'
|
|
|
|
]
|