replace "None" with DeviceNone in ALSA/Coreaudio
[ardour.git] / libs / backends / coreaudio / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options
4 import os
5 import sys
6 import re
7
8 I18N_PACKAGE = 'coreaudio-backend'
9
10 # Mandatory variables
11 top = '.'
12 out = 'build'
13
14 def options(opt):
15     autowaf.set_options(opt)
16
17 def configure(conf):
18     autowaf.configure(conf)
19     if Options.options.ppc:
20         conf.env['build_arch'] = "ppc"
21
22 def build(bld):
23     obj = bld(features = 'cxx cxxshlib')
24     obj.source = [ 'coreaudio_backend.cc',
25                    'coreaudio_pcmio.cc',
26                    'coremidi_io.cc'
27                  ]
28     obj.includes = ['.']
29     obj.name     = 'coreaudio_backend'
30     obj.target   = 'coreaudio_backend'
31     obj.use      = 'libardour libpbd'
32     obj.framework = [ 'CoreAudio', 'AudioToolbox', 'CoreServices' ]
33     if bld.env['build_target'] not in [ 'lion' ] and (not bld.env['build_arch'] == "ppc"):
34         obj.framework += [ 'CoreMidi' ]
35     else:
36         obj.framework += [ 'CoreMIDI' ]
37
38     obj.install_path  = os.path.join(bld.env['LIBDIR'], 'backends')
39     obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"',
40                    'ARDOURBACKEND_DLL_EXPORTS'
41                   ]
42
43     # use new coreaudio API (the old one was deprecated in 10.6, yet still works)
44     # only use with OSX intel 10.6 or later, but for all OSX/PPC (<= 10.6)
45     if not bld.env['build_target'] in ['panther', 'tiger', 'leopard']:
46         if not (bld.env['build_target'] == 'snowleopard' and bld.env['build_arch'] == "ppc"):
47             obj.defines += ['COREAUDIO_108']