summaryrefslogtreecommitdiff
path: root/libs/backends/wscript
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-08-08 10:57:10 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-08-08 10:57:20 -0400
commit16e37d975f2cb1d3ccaec377ab7aea962305e57e (patch)
treea5173a71713d31912aeffd37f3b9ebd9c7f1cf40 /libs/backends/wscript
parentce4333f05948c73d6bfee0cb6d0100e840612c82 (diff)
use some structured code to decide which backends to build (should have cherry picked from waves' code but ...)
Diffstat (limited to 'libs/backends/wscript')
-rw-r--r--libs/backends/wscript52
1 files changed, 30 insertions, 22 deletions
diff --git a/libs/backends/wscript b/libs/backends/wscript
index 7f3dcaef28..dee1feacba 100644
--- a/libs/backends/wscript
+++ b/libs/backends/wscript
@@ -9,6 +9,34 @@ import re
top = '.'
out = 'build'
+def backend_list():
+ if Options.options.program_name == 'Ardour':
+ # Ardour
+ backends = [ 'jack' ]
+
+ # These will come over from Ardour at some point soon (PD)
+ #if Options.options.build_dummy:
+ # backends += [ 'dummy' ]
+
+ #if Options.options.build_alsabackend:
+ # if re.search ("linux", sys.platform) != None:
+ # backends += [ 'alsa' ]
+
+ else:
+ # Not Ardour
+ if re.search ("linux", sys.platform) != None:
+ # Can't build this till the ALSA backend is merged because of a dependency (on Linux) on a shared utility library
+ # created for the ALSA backend and JACK.
+ # backends = [ 'jack' ]
+ backends = [ ]
+ else:
+ backends = [ ]
+
+ if sys.platform == 'darwin' or sys.platform == 'mingw' or sys.platform == 'msvc':
+ backends += [ 'wavesaudio' ]
+
+ return backends
+
def options(opt):
autowaf.set_options(opt)
@@ -20,33 +48,13 @@ def configure(conf):
autowaf.set_recursive()
autowaf.configure(conf)
- backends = [ 'jack' ]
-
- if sys.platform == 'darwin' or sys.platform == 'mingw' or sys.platform == 'msvc':
- backends += [ 'wavesaudio' ]
-
- if Options.options.build_dummy:
- backends += [ 'dummy' ]
-
- if Options.options.build_alsabackend:
- if re.search ("linux", sys.platform) != None:
- backends += [ 'alsa' ]
+ backends = backend_list()
for i in backends:
sub_config_and_use(conf, i)
def build(bld):
- backends = [ 'jack' ]
-
- if sys.platform == 'darwin' or sys.platform == 'mingw' or sys.platform == 'msvc':
- backends += [ 'wavesaudio' ]
-
- if bld.env['BUILD_DUMMYBACKEND']:
- backends += [ 'dummy' ]
-
- if re.search ("linux", sys.platform) != None:
- if bld.env['BUILD_ALSABACKEND'] and bld.is_defined('HAVE_ALSA'):
- backends += [ 'alsa' ]
+ backends = backend_list()
for i in backends:
bld.recurse(i)