2014-06-04 13:16:37 -04:00
|
|
|
#!/usr/bin/env python
|
|
|
|
from waflib.extras import autowaf as autowaf
|
|
|
|
from waflib import Options
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import re
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw':
|
|
|
|
autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
|
2014-06-04 21:26:52 -04:00
|
|
|
autowaf.check_pkg(conf, 'dbus-1', uselib_store='DBUS', mandatory = False)
|
2014-06-04 13:16:37 -04:00
|
|
|
|
|
|
|
def build(bld):
|
|
|
|
if re.search ("linux", sys.platform) != None:
|
|
|
|
if bld.is_defined('HAVE_ALSA'):
|
|
|
|
obj = bld(features = 'cxx cxxshlib')
|
|
|
|
obj.source = [
|
2015-08-11 12:16:02 -04:00
|
|
|
'devicelist.cc',
|
|
|
|
'deviceparams.cc'
|
2014-06-04 13:16:37 -04:00
|
|
|
]
|
|
|
|
obj.export_includes = ['.']
|
|
|
|
obj.includes = ['.']
|
|
|
|
obj.name = 'ardouralsautil'
|
|
|
|
obj.target = 'ardouralsautil'
|
|
|
|
obj.use = 'libpbd'
|
2016-02-28 15:16:44 -05:00
|
|
|
obj.uselib = [ 'ALSA', 'GLIBMM' ]
|
2014-06-04 13:16:37 -04:00
|
|
|
obj.vnum = '0.0.1'
|
2014-09-06 14:42:25 -04:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'])
|
2014-06-04 19:55:31 -04:00
|
|
|
|
2014-06-05 12:18:56 -04:00
|
|
|
if bld.env['BUILD_ALSABACKEND'] and bld.is_defined('HAVE_ALSA') and bld.is_defined('HAVE_DBUS'):
|
2014-06-04 19:55:31 -04:00
|
|
|
obj = bld(features = 'c cprogram')
|
|
|
|
obj.source = [
|
|
|
|
'reserve.c',
|
|
|
|
'request_device.c'
|
|
|
|
]
|
|
|
|
obj.includes = ['.']
|
2020-11-25 17:38:48 -05:00
|
|
|
obj.cflags = [ '-pthread' ]
|
2014-06-04 19:55:31 -04:00
|
|
|
obj.target = 'ardour-request-device'
|
|
|
|
obj.uselib = [ 'DBUS' ]
|
2014-06-07 08:30:35 -04:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'])
|
2014-06-04 19:55:31 -04:00
|
|
|
obj.defines = [
|
|
|
|
'_POSIX_SOURCE',
|
|
|
|
'_XOPEN_SOURCE=500',
|
2014-06-29 15:19:04 -04:00
|
|
|
'ARD_PROG_NAME="ardour-request-device"',
|
|
|
|
'ARD_APPL_NAME="Ardour ALSA Backend"',
|
2014-06-04 19:55:31 -04:00
|
|
|
]
|