|
|
@@ -1,14 +1,71 @@ |
|
|
|
#! /usr/bin/env python |
|
|
|
# encoding: utf-8 |
|
|
|
|
|
|
|
import Build |
|
|
|
import re |
|
|
|
import os |
|
|
|
|
|
|
|
def configure(conf): |
|
|
|
conf.check_cc(function_name='Pa_GetVersion', header_name='portaudio.h', lib='portaudio', uselib_store="PORTAUDIO", define_name='HAVE_PORTAUDIO') |
|
|
|
conf.check_cfg(package='portaudio-2.0', uselib_store='PORTAUDIO', atleast_version='19', args='--cflags --libs') |
|
|
|
conf.env['BUILD_DRIVER_PORTAUDIO'] = conf.is_defined('HAVE_PORTAUDIO') |
|
|
|
|
|
|
|
def create_jack_driver_obj(bld, target, sources, uselib = None): |
|
|
|
driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib']) |
|
|
|
driver.env['cxxshlib_PATTERN'] = 'jack_%s.dll' |
|
|
|
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] |
|
|
|
driver.includes = ['.', '..' , '../windows', '../common', '../common/jack'] |
|
|
|
driver.target = target |
|
|
|
driver.source = sources |
|
|
|
driver.install_path = '${ADDON_DIR}/' |
|
|
|
driver.use = ['serverlib'] |
|
|
|
if uselib: |
|
|
|
driver.use += uselib |
|
|
|
return driver |
|
|
|
|
|
|
|
def build(bld): |
|
|
|
print "" |
|
|
|
if bld.env['BUILD_JACKD'] == True: |
|
|
|
jackd = bld(features = ['cxx', 'cxxprogram']) |
|
|
|
jackd.includes = ['..', '../windows', '../common/jack', '../common', '../dbus'] |
|
|
|
jackd.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] |
|
|
|
jackd.source = ['../common/Jackdmp.cpp'] |
|
|
|
jackd.install_path = '${BINDIR}' |
|
|
|
jackd.use = ['serverlib'] |
|
|
|
jackd.target = 'jackd' |
|
|
|
|
|
|
|
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp') |
|
|
|
|
|
|
|
winmme_driver_src = [ |
|
|
|
'winmme/JackWinMMEDriver.cpp', |
|
|
|
'winmme/JackWinMMEInputPort.cpp', |
|
|
|
'winmme/JackWinMMEOutputPort.cpp', |
|
|
|
'winmme/JackWinMMEPort.cpp', |
|
|
|
] |
|
|
|
|
|
|
|
if bld.env['BUILD_DRIVER_WINMME'] == True: |
|
|
|
winmme_driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib']) |
|
|
|
winmme_driver.env['cxxshlib_PATTERN'] = 'jack_%s.dll' |
|
|
|
winmme_driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] |
|
|
|
winmme_driver.includes = ['.', '..' , '../windows', '../common', '../common/jack'] |
|
|
|
winmme_driver.target = 'winmme' |
|
|
|
winmme_driver.source = winmme_driver_src |
|
|
|
winmme_driver.install_path = '${ADDON_DIR}/' |
|
|
|
winmme_driver.use = ['serverlib', 'WINMME'] |
|
|
|
|
|
|
|
portaudio_driver_src = [ |
|
|
|
'portaudio/JackPortAudioDevices.cpp', |
|
|
|
'portaudio/JackPortAudioDriver.cpp', |
|
|
|
] |
|
|
|
|
|
|
|
if bld.env['BUILD_DRIVER_PORTAUDIO'] == True: |
|
|
|
portaudio_driver = bld(features = ['c', 'cxx', 'cxxshlib', 'cshlib']) |
|
|
|
portaudio_driver.env['cxxshlib_PATTERN'] = 'jack_%s.dll' |
|
|
|
portaudio_driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE'] |
|
|
|
portaudio_driver.includes = ['.', '..' , '../windows', '../common', '../common/jack'] |
|
|
|
portaudio_driver.target = 'portaudio' |
|
|
|
portaudio_driver.source = portaudio_driver_src |
|
|
|
portaudio_driver.install_path = '${ADDON_DIR}/' |
|
|
|
portaudio_driver.use = ['serverlib', 'PORTAUDIO' ] |
|
|
|
|
|
|
|
create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp') |
|
|
|
|
|
|
|
create_jack_driver_obj(bld, 'loopback', '../common/JackLoopbackDriver.cpp') |
|
|
|
|
|
|
|
create_jack_driver_obj(bld, 'netone', [ '../common/JackNetOneDriver.cpp', |
|
|
|
'../common/netjack.c', |
|
|
|
'../common/netjack_packet.c' ], ["SAMPLERATE", "CELT"] ) |