[wscript] Enable IIO driver
This commit is contained in:
parent
5d9c00da20
commit
3069c74211
|
@ -1,6 +1,8 @@
|
|||
#! /usr/bin/env python
|
||||
# encoding: utf-8
|
||||
|
||||
from waflib import Context
|
||||
|
||||
def configure(conf):
|
||||
conf.check_cfg(package='alsa', atleast_version='1.0.18', args='--cflags --libs', mandatory=False)
|
||||
conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')
|
||||
|
@ -13,6 +15,14 @@ def configure(conf):
|
|||
|
||||
conf.define('HAVE_PPOLL', 1 )
|
||||
|
||||
conf.check_cfg(package='gtkIOStream', atleast_version='1.4.0', args='--cflags --libs', mandatory=False)
|
||||
conf.env['BUILD_DRIVER_IIO'] = conf.is_defined('HAVE_GTKIOSTREAM')
|
||||
conf.check_cfg(package='eigen3', atleast_version='3.1.2', args='--cflags --libs', mandatory=False)
|
||||
conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_EIGEN3')
|
||||
conf.check_cfg(package='sox', atleast_version='14.4.0', args='--cflags --libs', mandatory=False)
|
||||
conf.env['BUILD_DRIVER_IIO'] += conf.is_defined('HAVE_SOX')
|
||||
|
||||
|
||||
def create_jack_driver_obj(bld, target, sources, uselib = None):
|
||||
driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
|
||||
driver.env['cxxshlib_PATTERN'] = 'jack_%s.so'
|
||||
|
@ -74,6 +84,8 @@ def build(bld):
|
|||
'firewire/JackFFADOMidiSendQueue.cpp'
|
||||
]
|
||||
|
||||
iio_driver_src = ['iio/JackIIODriver.cpp']
|
||||
|
||||
if bld.env['BUILD_DRIVER_ALSA'] == True:
|
||||
create_jack_driver_obj(bld, 'alsa', alsa_driver_src, ["ALSA"])
|
||||
create_jack_driver_obj(bld, 'alsarawmidi', alsarawmidi_driver_src,
|
||||
|
@ -85,6 +97,9 @@ def build(bld):
|
|||
if bld.env['BUILD_DRIVER_FFADO'] == True:
|
||||
create_jack_driver_obj(bld, 'firewire', ffado_driver_src, ["LIBFFADO"])
|
||||
|
||||
if bld.env['BUILD_DRIVER_IIO'] == True:
|
||||
create_jack_driver_obj(bld, 'iio', iio_driver_src, ["GTKIOSTREAM", "EIGEN3"])
|
||||
|
||||
create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')
|
||||
|
||||
create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp')
|
||||
|
|
5
wscript
5
wscript
|
@ -83,6 +83,7 @@ def options(opt):
|
|||
opt.add_option('--firewire', action='store_true', default=False, help='Enable FireWire driver (FFADO)')
|
||||
opt.add_option('--freebob', action='store_true', default=False, help='Enable FreeBob driver')
|
||||
opt.add_option('--alsa', action='store_true', default=False, help='Enable ALSA driver')
|
||||
opt.add_option('--iio', action='store_true', default=False, help='Enable IIO driver')
|
||||
opt.add_option('--autostart', type='string', default="default", help='Autostart method. Possible values: "default", "classic", "dbus", "none"')
|
||||
opt.add_option('--portaudio', action='store_true', default=False, help='Enable Portaudio driver')
|
||||
opt.add_option('--winmme', action='store_true', default=False, help='Enable WinMME driver')
|
||||
|
@ -149,9 +150,12 @@ def configure(conf):
|
|||
conf.fatal('FreeBob driver was explicitly requested but cannot be built')
|
||||
if Options.options.firewire and not conf.env['BUILD_DRIVER_FFADO']:
|
||||
conf.fatal('FFADO driver was explicitly requested but cannot be built')
|
||||
if Options.options.iio and not conf.env['BUILD_DRIVER_IIO']:
|
||||
conf.fatal('IIO driver was explicitly requested but cannot be built')
|
||||
conf.env['BUILD_DRIVER_ALSA'] = Options.options.alsa
|
||||
conf.env['BUILD_DRIVER_FFADO'] = Options.options.firewire
|
||||
conf.env['BUILD_DRIVER_FREEBOB'] = Options.options.freebob
|
||||
conf.env['BUILD_DRIVER_IIO'] = Options.options.iio
|
||||
if conf.env['IS_WINDOWS']:
|
||||
conf.sub_config('windows')
|
||||
if Options.options.portaudio and not conf.env['BUILD_DRIVER_PORTAUDIO']:
|
||||
|
@ -350,6 +354,7 @@ def configure(conf):
|
|||
display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
|
||||
display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
|
||||
display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
|
||||
display_feature('Build with IIO support', conf.env['BUILD_DRIVER_IIO'] == True)
|
||||
|
||||
if conf.env['IS_WINDOWS']:
|
||||
display_feature('Build with WinMME support', conf.env['BUILD_DRIVER_WINMME'] == True)
|
||||
|
|
Loading…
Reference in New Issue