wscript 2.45 KB
Newer Older
1
2
3
#! /usr/bin/env python
# encoding: utf-8

4
def configure(conf):
5
    conf.check_cfg(package='alsa', atleast_version='1.0.0', args='--cflags --libs')
6
7
    conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')

8
    conf. check_cfg(package='libfreebob', atleast_version='1.0.0', args='--cflags --libs')
9
10
    conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB')

11
    conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs')
12
13
    conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')

14
def create_jack_driver_obj(bld, target, sources, uselib = None):
15
    driver = bld.new_task_gen('cxx', 'shlib')
nedko's avatar
nedko committed
16
17
    driver.features.append('cc')
    driver.env['shlib_PATTERN'] = 'jack_%s.so'
18
    driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
19
    driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack', '../dbus']
nedko's avatar
nedko committed
20
21
    driver.target = target
    driver.source = sources
22
    driver.install_path = '${ADDON_DIR}/'
23
24
    if uselib:
        driver.uselib = uselib
nedko's avatar
nedko committed
25
26
    return driver

27
def build(bld):
28
    jackd = bld.new_task_gen('cxx', 'program')
29
    jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus']
30
    jackd.defines = 'HAVE_CONFIG_H'
31
32
33
34
    jackd.source = ['../common/Jackdmp.cpp']
    jackd.uselib = 'PTHREAD DL RT'
    jackd.uselib_local = 'serverlib'
    jackd.target = 'jackd'
35

nedko's avatar
nedko committed
36
    create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
37

38
    if bld.env['BUILD_DRIVER_ALSA'] == True:
nedko's avatar
nedko committed
39
40
41
42
        create_jack_driver_obj(bld, 'alsa', ['alsa/JackAlsaDriver.cpp',
                                             'alsa/alsa_rawmidi.c',
                                             'alsa/alsa_seqmidi.c',
                                             'alsa/alsa_midi_jackmp.cpp',
sletz's avatar
sletz committed
43
                                             '../common/memops.c',
nedko's avatar
nedko committed
44
45
46
47
                                             'alsa/generic_hw.c',
                                             'alsa/hdsp.c',
                                             'alsa/hammerfall.c',
                                             'alsa/ice1712.c'
48
                                             ], "ALSA")
49

50
    if bld.env['BUILD_DRIVER_FREEBOB'] == True:
51
        create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB")
52

53
    if bld.env['BUILD_DRIVER_FFADO'] == True:
54
        create_jack_driver_obj(bld, 'firewire', 'firewire/JackFFADODriver.cpp', "LIBFFADO")
sletz's avatar
sletz committed
55
56
57

    create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')