#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
+from waflib import Options
import os
import sys
import re
def configure(conf):
autowaf.configure(conf)
+ if Options.options.ppc:
+ conf.env['build_arch'] = "ppc"
def build(bld):
obj = bld(features = 'cxx cxxshlib')
'ARDOURBACKEND_DLL_EXPORTS', 'COREAUDIO_108'
]
- # OSX 10.6 or later
- obj.defines += ['COREAUDIO_108']
+ # use new coreaudio API (the old one was deprecated in 10.6, yet still works)
+ # only use with OSX intel 10.6 or later, but for all OSX/PPC (<= 10.6)
+ if not bld.env['build_target'] in ['panther', 'tiger', 'leopard']:
+ if not (bld.env['build_target'] == 'snow leopard' and conf.env['build_arch'] == "ppc"):
+ obj.defines += ['COREAUDIO_108']
opt.add_option('--arch', type='string', action='store', dest='arch',
help='Architecture-specific compiler FLAGS')
opt.add_option('--with-backends', type='string', action='store', default='jack', dest='with_backends',
- help='Specify which backend modules are to be included(jack,alsa,wavesaudio,dummy)')
+ help='Specify which backend modules are to be included(jack,alsa,wavesaudio,dummy,coreaudio)')
opt.add_option('--backtrace', action='store_true', default=True, dest='backtrace',
help='Compile with -rdynamic -- allow obtaining backtraces from within Ardour')
opt.add_option('--no-carbon', action='store_true', default=False, dest='nocarbon',
conf.env['BUILD_ALSABACKEND'] = any('alsa' in b for b in backends)
conf.env['BUILD_DUMMYBACKEND'] = any('dummy' in b for b in backends)
conf.env['BUILD_WAVESBACKEND'] = any('wavesaudio' in b for b in backends)
+ conf.env['BUILD_CORECRAPPITA'] = any('coreaudio' in b for b in backends)
+
+ if conf.env['BUILD_CORECRAPPITA'] and conf.env['BUILD_WAVESBACKEND']:
+ print("Coreaudio + Waves Backend are mutually exclusive")
+ sys.exit(1)
+
+ if sys.platform != 'darwin' and conf.env['BUILD_CORECRAPPITA']:
+ print("Coreaudio backend is only available for OSX")
+ sys.exit(1)
+
+ if sys.platform == 'linux' and conf.env['BUILD_WAVESBACKEND']:
+ print("Waves Backend is not for Linux")
+ sys.exit(1)
+
+ if sys.platform != 'linux' and conf.env['BUILD_ALSABACKEND']:
+ print("ALSA Backend is only available on Linux")
+ sys.exit(1)
+
set_compiler_flags (conf, Options.options)
write_config_text('No plugin state', conf.is_defined('NO_PLUGIN_STATE'))
write_config_text('Build target', conf.env['build_target'])
write_config_text('CoreAudio', conf.is_defined('HAVE_COREAUDIO'))
+ write_config_text('CoreAudio/Midi Backend',conf.env['BUILD_CORECRAPPITA'])
write_config_text('Debug RT allocations', conf.is_defined('DEBUG_RT_ALLOC'))
write_config_text('Debug Symbols', conf.is_defined('debug_symbols') or conf.env['DEBUG'])
write_config_text('Dummy backend', conf.env['BUILD_DUMMYBACKEND'])