wscript 2.55 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
25
    driver.uselib_local = 'serverlib'
nedko's avatar
nedko committed
26
27
    return driver

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

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

40
    if bld.env['BUILD_DRIVER_ALSA'] == True:
nedko's avatar
nedko committed
41
42
43
44
        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
45
                                             '../common/memops.c',
nedko's avatar
nedko committed
46
47
48
49
                                             'alsa/generic_hw.c',
                                             'alsa/hdsp.c',
                                             'alsa/hammerfall.c',
                                             'alsa/ice1712.c'
50
                                             ], "ALSA")
51

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

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

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