2013-09-07 11:03:57 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
from waflib.extras import autowaf as autowaf
|
2014-05-28 22:30:06 -04:00
|
|
|
from waflib import Options
|
2013-09-07 11:03:57 -04:00
|
|
|
import os
|
2014-02-24 15:17:18 -05:00
|
|
|
import sys
|
2014-06-02 08:29:19 -04:00
|
|
|
import re
|
2013-09-07 11:03:57 -04:00
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
|
|
|
|
2014-08-08 10:57:10 -04:00
|
|
|
def backend_list():
|
|
|
|
if Options.options.program_name == 'Ardour':
|
|
|
|
backends = [ 'jack' ]
|
|
|
|
|
2014-08-08 11:00:30 -04:00
|
|
|
if Options.options.build_dummy:
|
|
|
|
backends += [ 'dummy' ]
|
2014-08-08 10:57:10 -04:00
|
|
|
|
2014-10-14 16:58:11 -04:00
|
|
|
elif Options.options.program_name == 'Mixbus':
|
|
|
|
backends = [ 'jack' ]
|
2014-08-08 10:57:10 -04:00
|
|
|
|
2014-10-14 16:58:11 -04:00
|
|
|
elif Options.options.program_name == 'Tracks':
|
2014-08-08 10:57:10 -04:00
|
|
|
if re.search ("linux", sys.platform) != None:
|
2014-10-14 16:58:11 -04:00
|
|
|
backends = [ 'jack' ]
|
2014-08-08 10:57:10 -04:00
|
|
|
else:
|
|
|
|
backends = [ ]
|
|
|
|
|
2014-10-14 16:58:11 -04:00
|
|
|
else:
|
|
|
|
print ('Unknown product name; backends will not include JACK ', Options.options.program_name)
|
|
|
|
|
|
|
|
if re.search ("linux", sys.platform) != None:
|
|
|
|
if Options.options.build_alsabackend:
|
|
|
|
backends += [ 'alsa' ]
|
|
|
|
|
2014-10-01 12:28:47 -04:00
|
|
|
if sys.platform == 'darwin' or sys.platform == 'mingw' or sys.platform == 'msvc' or Options.options.dist_target == 'mingw':
|
|
|
|
if Options.options.build_wavesbackend:
|
|
|
|
backends += [ 'wavesaudio' ]
|
2014-08-08 10:57:10 -04:00
|
|
|
|
|
|
|
return backends
|
|
|
|
|
2013-09-07 11:03:57 -04:00
|
|
|
def options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def sub_config_and_use(conf, name, has_objects = True):
|
|
|
|
conf.recurse(name)
|
|
|
|
autowaf.set_local_lib(conf, name, has_objects)
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
autowaf.set_recursive()
|
|
|
|
autowaf.configure(conf)
|
|
|
|
|
2014-08-08 10:57:10 -04:00
|
|
|
backends = backend_list()
|
2014-09-03 18:44:16 -04:00
|
|
|
conf.env['BACKENDS'] = backends
|
|
|
|
|
2013-09-07 11:03:57 -04:00
|
|
|
for i in backends:
|
|
|
|
sub_config_and_use(conf, i)
|
|
|
|
|
|
|
|
def build(bld):
|
2014-09-03 18:44:16 -04:00
|
|
|
backends = bld.env['BACKENDS']
|
2014-06-02 08:29:19 -04:00
|
|
|
|
2013-09-07 11:03:57 -04:00
|
|
|
for i in backends:
|
|
|
|
bld.recurse(i)
|