Unverified Commit 089bc063 authored by Karl Linden's avatar Karl Linden
Browse files

Tidy up linux/wscript and make it ready for unification. See issue #164.

parent 3368b91d
#! /usr/bin/env python
# encoding: utf-8
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib'])
def create_jack_driver_obj(bld, **kw):
driver = bld(
features = ['c', 'cxx', 'cxxshlib', 'cshlib'],
defines = ['HAVE_CONFIG_H', 'SERVER_SIDE'],
includes = ['../linux',
'../posix',
'../common',
'../common/jack',
'../dbus',
'../'],
install_path = '${ADDON_DIR}/',
**kw)
driver.env['cxxshlib_PATTERN'] = 'jack_%s.so'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack', '../dbus', '../']
driver.target = target
driver.source = sources
driver.install_path = '${ADDON_DIR}/'
driver.use = []
if uselib:
driver.use += uselib
return driver
def build(bld):
if bld.env['BUILD_JACKD'] == True:
jackd = bld(features = ['cxx', 'cxxprogram'])
jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus', '../']
jackd.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
jackd.source = ['../common/Jackdmp.cpp']
jackd.use = ['serverlib']
jackd = bld(
features = ['cxx', 'cxxprogram'],
defines = ['HAVE_CONFIG_H','SERVER_SIDE'],
includes = ['../linux',
'../posix',
'../common/jack',
'../common',
'../dbus',
'../'],
target = 'jackd',
source = ['../common/Jackdmp.cpp'],
use = ['serverlib', 'DL', 'PTHREAD', 'RT', 'M', 'STDC++'])
if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']:
jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c']
jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++', 'DBUS-1']
else:
jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++']
jackd.target = 'jackd'
jackd.use += ['DBUS-1']
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
create_jack_driver_obj(
bld,
target = 'dummy',
source = '../common/JackDummyDriver.cpp')
alsa_driver_src = [
'alsa/JackAlsaDriver.cpp',
......@@ -63,26 +71,58 @@ def build(bld):
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,
["ALSA"])
if bld.env['BUILD_DRIVER_FREEBOB'] == True:
create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', ["LIBFREEBOB"])
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')
create_jack_driver_obj(bld, 'netone', [ '../common/JackNetOneDriver.cpp',
'../common/netjack.c',
'../common/netjack_packet.c' ], ["SAMPLERATE", "CELT"])
create_jack_driver_obj(bld, 'proxy', '../common/JackProxyDriver.cpp')
if bld.env['BUILD_DRIVER_ALSA']:
create_jack_driver_obj(
bld,
target = 'alsa',
source = alsa_driver_src,
use = ['ALSA'])
create_jack_driver_obj(
bld,
target = 'alsarawmidi',
source = alsarawmidi_driver_src,
use = ['ALSA'])
if bld.env['BUILD_DRIVER_FREEBOB']:
create_jack_driver_obj(
bld,
target = 'freebob',
source = 'freebob/JackFreebobDriver.cpp',
use = ['LIBFREEBOB'])
if bld.env['BUILD_DRIVER_FFADO']:
create_jack_driver_obj(
bld,
target = 'firewire',
source = ffado_driver_src,
use = ['LIBFFADO'])
if bld.env['BUILD_DRIVER_IIO']:
create_jack_driver_obj(
bld,
target = 'iio',
source = iio_driver_src,
use = ['GTKIOSTREAM', 'EIGEN3'])
create_jack_driver_obj(
bld,
target = 'net',
source = '../common/JackNetDriver.cpp')
create_jack_driver_obj(
bld,
target = 'loopback',
source = '../common/JackLoopbackDriver.cpp')
create_jack_driver_obj(
bld,
target = 'netone',
source = ['../common/JackNetOneDriver.cpp',
'../common/netjack.c',
'../common/netjack_packet.c'],
use = ['SAMPLERATE', 'CELT'])
create_jack_driver_obj(
bld,
target = 'proxy',
source = '../common/JackProxyDriver.cpp')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment