wscript 2.07 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')

nedko's avatar
nedko committed
14
15
16
17
18
19
20
21
22
23
24
25
def create_jack_driver_obj(bld, target, sources):
    driver = bld.create_obj('cpp', 'shlib')
    driver.features.append('cc')
    driver.env['shlib_PATTERN'] = 'jack_%s.so'
    driver.defines = 'HAVE_CONFIG_H'
    driver.includes = ['.', '../common', '../common/jack']
    driver.target = target
    driver.source = sources
    driver.inst_var = bld.env()['ADDON_DIR']
    driver.inst_dir = '/'
    return driver

26
def build(bld):
27
    jackd = bld.create_obj('cpp', 'program')
nedko's avatar
nedko committed
28
    jackd.includes = ['../common/jack', '../common']
29
30
31
32
    jackd.source = ['../common/Jackdmp.cpp']
    jackd.uselib = 'PTHREAD DL RT'
    jackd.uselib_local = 'serverlib'
    jackd.target = 'jackd'
33

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

    if bld.env()['BUILD_DRIVER_ALSA'] == True:
nedko's avatar
nedko committed
37
38
39
40
41
42
43
44
45
46
        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'
                                             ])
47
48

    if bld.env()['BUILD_DRIVER_FREEBOB'] == True:
nedko's avatar
nedko committed
49
        create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp')
50
51

    if bld.env()['BUILD_DRIVER_FFADO'] == True:
nedko's avatar
nedko committed
52
        create_jack_driver_obj(bld, 'firewire', 'firewire/JackFFADODriver.cpp')