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

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
47
48
49
50
51
52
53
54
55
56
    
    alsa_driver_src = ['alsa/JackAlsaDriver.cpp',
                       'alsa/alsa_rawmidi.c',
                       'alsa/alsa_seqmidi.c',
                       'alsa/alsa_midi_jackmp.cpp',
                       '../common/memops.c',
                       'alsa/generic_hw.c',
                       'alsa/hdsp.c',
                       'alsa/hammerfall.c',
                       'alsa/ice1712.c'
                       ]
57

58
    if bld.env['BUILD_DRIVER_ALSA'] == True:
59
        create_jack_driver_obj(bld, 'alsa', alsa_driver_src, "ALSA")
60

61
    if bld.env['BUILD_DRIVER_FREEBOB'] == True:
62
        create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB")
63

64
    if bld.env['BUILD_DRIVER_FFADO'] == True:
65
        create_jack_driver_obj(bld, 'firewire', 'firewire/JackFFADODriver.cpp', "LIBFFADO")
sletz's avatar
sletz committed
66
67
68

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

69
    create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp')
Torben Hohn's avatar
Torben Hohn committed
70
71

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