13
0
livetrax/libs/backends/wscript

63 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os
import sys
import re
# Mandatory variables
top = '.'
out = 'build'
def backend_list():
if Options.options.program_name == 'Ardour':
backends = [ 'jack' ]
elif Options.options.program_name == 'Mixbus':
backends = [ 'jack' ]
elif Options.options.program_name == 'Tracks':
if re.search ("linux", sys.platform) != None:
backends = [ 'jack' ]
else:
backends = [ ]
else:
print ('Unknown product name; backends will not include JACK ', Options.options.program_name)
2014-11-18 18:04:23 -05:00
if Options.options.build_dummy:
backends += [ 'dummy' ]
if re.search ("linux", sys.platform) != None:
if Options.options.build_alsabackend:
backends += [ 'alsa' ]
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' ]
return backends
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)
backends = backend_list()
2014-09-03 18:44:16 -04:00
conf.env['BACKENDS'] = backends
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']
for i in backends:
bld.recurse(i)