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

4
def configure(conf):
sletz's avatar
sletz committed
5
    conf.check_cfg(package='alsa', atleast_version='1.0.18', 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')

Torben Hohn's avatar
Torben Hohn committed
14
15
16
    conf.define('HAVE_PPOLL', 1 )


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

31
def build(bld):
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']
37
38
39
40
41
	if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']: 
            jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c'] 
            jackd.uselib = 'PTHREAD DL RT DBUS-1'
	else:
            jackd.uselib = 'PTHREAD DL RT'		
42
43
        jackd.uselib_local = 'serverlib'
        jackd.target = 'jackd'
44
  	
nedko's avatar
nedko committed
45
    create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
46
    
sletz's avatar
sletz committed
47
48
    alsa_driver_src = [
                       'alsa/JackAlsaDriver.cpp',
49
50
51
52
53
54
                       'alsa/alsa_rawmidi.c',
                       'alsa/alsa_seqmidi.c',
                       'alsa/alsa_midi_jackmp.cpp',
                       '../common/memops.c',
                       'alsa/generic_hw.c',
                       'alsa/hdsp.c',
sletz's avatar
sletz committed
55
		       'alsa/alsa_driver.c',
56
57
58
                       'alsa/hammerfall.c',
                       'alsa/ice1712.c'
                       ]
59

60
61
62
63
64
65
66
    ffado_driver_src = ['firewire/JackFFADODriver.cpp',
                        'firewire/JackFFADOMidiInput.cpp',
                        'firewire/JackFFADOMidiOutput.cpp',
                        '../common/JackPhysicalMidiInput.cpp',
                        '../common/JackPhysicalMidiOutput.cpp'
                       ]

67
    if bld.env['BUILD_DRIVER_ALSA'] == True:
68
        create_jack_driver_obj(bld, 'alsa', alsa_driver_src, "ALSA")
69

70
    if bld.env['BUILD_DRIVER_FREEBOB'] == True:
71
        create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB")
72

73
    if bld.env['BUILD_DRIVER_FFADO'] == True:
74
        create_jack_driver_obj(bld, 'firewire', ffado_driver_src, "LIBFFADO")
sletz's avatar
sletz committed
75
76
77

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

78
    create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp')
Torben Hohn's avatar
Torben Hohn committed
79
80

    create_jack_driver_obj(bld, 'netone', [ '../common/JackNetOneDriver.cpp',
nedko's avatar
nedko committed
81
82
                                            '../common/netjack.c',
                                            '../common/netjack_packet.c' ], "SAMPLERATE CELT" )
Torben Hohn's avatar
Torben Hohn committed
83