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

4
5
6
7
8
9
10
11
12
13
def configure(conf):
    conf.check_pkg('alsa', vnum = '1.0.0')
    conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')

    conf.check_pkg('libfreebob', vnum = '1.0.0')
    conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB')

    conf.check_pkg('libffado', vnum = '1.999.17')
    conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')

14
def create_jack_driver_obj(bld, target, sources, uselib = None):
nedko's avatar
nedko committed
15
16
17
    driver = bld.create_obj('cpp', 'shlib')
    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']
nedko's avatar
nedko committed
20
21
22
23
    driver.target = target
    driver.source = sources
    driver.inst_var = bld.env()['ADDON_DIR']
    driver.inst_dir = '/'
24
25
    if uselib:
        driver.uselib = uselib
nedko's avatar
nedko committed
26
27
    return driver

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

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

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

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

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

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