wscript 2.73 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 build(bld):
15
    jackd = bld.create_obj('cpp', 'program')
nedko's avatar
nedko committed
16
    jackd.includes = ['../common/jack', '../common']
17
18
19
20
    jackd.source = ['../common/Jackdmp.cpp']
    jackd.uselib = 'PTHREAD DL RT'
    jackd.uselib_local = 'serverlib'
    jackd.target = 'jackd'
21

22
    driver_dummy = bld.create_obj('cpp', 'shlib')
23
    driver_dummy.env['shlib_PATTERN'] = 'jack_%s.so'
24
25
26
27
    driver_dummy.defines = 'HAVE_CONFIG_H'
    driver_dummy.includes = ['../common/jack']
    driver_dummy.target = 'dummy'
    driver_dummy.source = '../common/JackDummyDriver.cpp'
28
29
    driver_dummy.inst_var = bld.env()['ADDON_DIR']
    driver_dummy.inst_dir = '/'
30
31
32
33

    if bld.env()['BUILD_DRIVER_ALSA'] == True:
        driver_alsa = bld.create_obj('cpp', 'shlib')
        driver_alsa.features.append('cc')
34
        driver_alsa.env['shlib_PATTERN'] = 'jack_%s.so'
35
36
37
38
39
40
41
42
43
44
45
46
47
48
        driver_alsa.defines = 'HAVE_CONFIG_H JACKMP'
        driver_alsa.includes = ['.', '../common', '../common/jack']
        driver_alsa.target = 'alsa'
        driver_alsa.source = [
            '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
50
        driver_alsa.inst_var = bld.env()['ADDON_DIR']
        driver_alsa.inst_dir = '/'
51
52
53

    if bld.env()['BUILD_DRIVER_FREEBOB'] == True:
        driver_freebob = bld.create_obj('cpp', 'shlib')
54
        driver_freebob.env['shlib_PATTERN'] = 'jack_%s.so'
55
56
57
58
        driver_freebob.defines = 'HAVE_CONFIG_H'
        driver_freebob.includes = ['.', '../common', '../common/jack']
        driver_freebob.target = 'freebob'
        driver_freebob.source = 'freebob/JackFreebobDriver.cpp'
59
60
        driver_freebob.inst_var = bld.env()['ADDON_DIR']
        driver_freebob.inst_dir = '/'
61
62
63

    if bld.env()['BUILD_DRIVER_FFADO'] == True:
        driver_ffado = bld.create_obj('cpp', 'shlib')
64
        driver_ffado.env['shlib_PATTERN'] = 'jack_%s.so'
65
66
67
68
        driver_ffado.defines = 'HAVE_CONFIG_H'
        driver_ffado.includes = ['.', '../common', '../common/jack']
        driver_ffado.target = 'firewire'
        driver_ffado.source = 'firewire/JackFFADODriver.cpp'
69
70
        driver_ffado.inst_var = bld.env()['ADDON_DIR']
        driver_ffado.inst_dir = '/'