Commit 3383f369 authored by nedko's avatar nedko
Browse files

Import waf.diff patch sent Stephane Letz

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3075 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 476a2b21
#! /usr/bin/env python
# encoding: utf-8
import Build
import re
import os
def configure(conf):
conf.check_tool('misc')
e = conf.create_header_configurator()
e.name = 'samplerate.h'
e.define = 'HAVE_SAMPLERATE'
e.run()
conf.check_cc(header_name='samplerate.h', define_name="HAVE_SAMPLERATE")
if conf.is_defined('HAVE_SAMPLERATE'):
conf.env['LIB_SAMPLERATE'] = ['samplerate']
conf.env['BUILD_ADAPTER'] = conf.is_defined('HAVE_SAMPLERATE')
# by default waf subst tool uses @VAR@ while scons legacy is ${VAR}
# so we use same template as scons for now
def subst_func(tsk):
"Substitutes variables in a .in file"
m4_re = re.compile('\$\{(\w+)\}', re.M)
env = tsk.env()
infile = tsk.m_inputs[0].abspath(env)
outfile = tsk.m_outputs[0].abspath(env)
file = open(infile, 'r')
code = file.read()
file.close()
s = m4_re.sub(r'%(\1)s', code)
dict = tsk.dict
if not dict:
names = m4_re.findall(code)
for i in names:
if env[i] and type(env[i]) is types.ListType :
dict[i] = " ".join(env[i])
else: dict[i] = env[i]
file = open(outfile, 'w')
file.write(s % dict)
file.close()
return 0
def create_jack_process_obj(bld, target, sources, uselib = None):
process = bld.create_obj('cpp', 'shlib')
process = bld.new_task_gen('cxx', 'shlib')
process.env['shlib_PATTERN'] = '%s.so'
process.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
env_includes = ['../macosx', '../posix', '../macosx/coreaudio']
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
env_includes = ['../linux', '../posix', '../linux/alsa']
process.includes = ['.'] + env_includes + ['jack', '..']
process.name = target
process.target = target
process.source = sources
process.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
process.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#process.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
process.env.append_value("LINKFLAGS", "")
process.inst_var = bld.env()['ADDON_DIR']
process.inst_dir = '/'
#steph
#process.inst_var = bld.env['ADDON_DIR']
#process.inst_dir = '/'
process.install_path = '${ADDON_DIR}/'
process.uselib_local = uselib.name
return process
......@@ -99,7 +66,7 @@ def build(bld):
includes = ['.', './jack', '..']
uselib = ["PTHREAD"]
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
common_libsources += [
'../posix/JackPosixThread.cpp',
'../posix/JackPosixSemaphore.cpp',
......@@ -112,7 +79,7 @@ def build(bld):
uselib.append('RT')
uselib.append('DL')
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
common_libsources += [
'../posix/JackProcessSync.cpp',
'../posix/JackPosixThread.cpp',
......@@ -123,7 +90,7 @@ def build(bld):
]
includes = ['../macosx', '../macosx/RPC', '../posix'] + includes
serverlib = bld.create_obj('cpp', 'shlib')
serverlib = bld.new_task_gen('cxx', 'shlib')
serverlib.features.append('cc')
serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
serverlib.includes = includes
......@@ -141,8 +108,8 @@ def build(bld):
'JackLoopbackDriver.cpp',
'JackServer.cpp',
'JackThreadedDriver.cpp',
'JackRestartThreadedDriver.cpp',
'JackWaitThreadedDriver.cpp',
'JackRestartThreadedDriver.cpp',
'JackWaitThreadedDriver.cpp',
'JackServerAPI.cpp',
'JackDriverLoader.cpp',
'JackServerGlobals.cpp',
......@@ -151,7 +118,7 @@ def build(bld):
'JackNetInterface.cpp',
]
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
serverlib.source += [
'../posix/JackSocketServerChannel.cpp',
'../posix/JackSocketNotifyChannel.cpp',
......@@ -159,7 +126,7 @@ def build(bld):
'../posix/JackNetUnixSocket.cpp',
]
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
serverlib.source += [
'../macosx/JackMachServerChannel.cpp',
'../macosx/JackMachNotifyChannel.cpp',
......@@ -169,19 +136,19 @@ def build(bld):
'../posix/JackNetUnixSocket.cpp',
]
serverlib.vnum = bld.env()['JACK_API_VERSION']
serverlib.vnum = bld.env['JACK_API_VERSION']
serverlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
serverlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module -arch i386 -arch ppc")
serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
serverlib.env.append_value("LINKFLAGS", "-compatibility_version 1 -current_version 1")
clientlib = bld.create_obj('cpp', 'shlib')
clientlib = bld.new_task_gen('cxx', 'shlib')
clientlib.features.append('cc')
clientlib.defines = 'HAVE_CONFIG_H'
clientlib.uselib = uselib
if bld.env()['BUILD_JACKDBUS'] == True:
if bld.env['BUILD_JACKDBUS'] == True:
clientlib.uselib.append('DBUS-1')
clientlib.includes = includes
clientlib.name = 'clientlib'
......@@ -192,13 +159,13 @@ def build(bld):
'JackLibAPI.cpp',
]
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
clientlib.source += [
'../posix/JackSocketClientChannel.cpp',
'../posix/JackPosixServerLaunch.cpp',
]
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
clientlib.source += [
'../macosx/JackMachClientChannel.cpp',
'../macosx/RPC/JackRPCEngineUser.c',
......@@ -206,9 +173,9 @@ def build(bld):
'../posix/JackPosixServerLaunch.cpp',
]
clientlib.vnum = bld.env()['JACK_API_VERSION']
clientlib.vnum = bld.env['JACK_API_VERSION']
clientlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
clientlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module -arch i386 -arch ppc")
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
......@@ -219,30 +186,30 @@ def build(bld):
net_adapter_sources = [
'JackResampler.cpp',
'JackLibSampleRateResampler.cpp',
'JackAudioAdapter.cpp',
'JackAudioAdapter.cpp',
'JackAudioAdapterInterface.cpp',
'JackNetAdapter.cpp',
]
if bld.env()['BUILD_ADAPTER'] == True:
if bld.env['BUILD_ADAPTER'] == True:
process = create_jack_process_obj(bld, 'netadapter', net_adapter_sources, serverlib)
process.uselib = 'SAMPLERATE'
audio_adapter_sources = [
'JackResampler.cpp',
'JackLibSampleRateResampler.cpp',
'JackAudioAdapter.cpp',
'JackAudioAdapter.cpp',
'JackAudioAdapterInterface.cpp',
'JackAudioAdapterFactory.cpp',
]
if bld.env()['BUILD_ADAPTER'] and bld.env()['IS_MACOSX']:
if bld.env['BUILD_ADAPTER'] and bld.env['IS_MACOSX']:
audio_adapter_sources += ['../macosx/coreaudio/JackCoreAudioAdapter.cpp']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.env.append_value("LINKFLAGS", "-framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework CoreServices")
process.uselib = 'SAMPLERATE'
if bld.env()['BUILD_ADAPTER'] and bld.env()['IS_LINUX']:
if bld.env['BUILD_ADAPTER'] and bld.env['IS_LINUX']:
audio_adapter_sources += ['../linux/alsa/JackAlsaAdapter.cpp']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.uselib = ['ALSA', 'SAMPLERATE']
......@@ -250,18 +217,20 @@ def build(bld):
#audio_adapter_sources += ['../windows/JackPortAudioAdapter.cpp']
#process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
install_files('PREFIX', 'include/jack', 'jack/*.h')
bld.install_files('${PREFIX}/include/jack', 'jack/*.h')
# process jack.pc.in -> jack.pc
obj = bld.create_obj('subst')
import misc
obj = bld.new_task_gen('subst')
obj.source = '../jack.pc.in'
obj.target = 'jack.pc'
obj.dict = {'PREFIX': bld.env()['PREFIX'],
'LIBDIR': os.path.normpath(bld.env()['PREFIX'] + '/lib'),
'INCLUDEDIR': os.path.normpath(bld.env()['PREFIX'] + '/include'),
obj.dict = {'PREFIX': bld.env['PREFIX'],
'LIBDIR': os.path.normpath(bld.env['PREFIX'] + '/lib'),
'INCLUDEDIR': os.path.normpath(bld.env['PREFIX'] + '/include'),
'SERVERLIB': serverlib.target,
'JACK_VERSION': bld.env()['JACK_VERSION'],
'JACK_VERSION': bld.env['JACK_VERSION'],
}
obj.inst_var = bld.env()['PREFIX']
obj.inst_dir = '/lib/pkgconfig/'
obj.fun = subst_func # @VAR@ -> ${VAR}
obj.install_path = '${PREFIX}/lib/pkgconfig/'
#steph
#obj.fun = subst_func # @VAR@ -> ${VAR}
obj.fun = misc.subst_func
[D-BUS Service]
Name=org.jackaudio.service
Exec=${BINDIR}/jackdbus auto
Exec=@BINDIR@/jackdbus auto
#! /usr/bin/env python
# encoding: utf-8
import Params
import os.path
import Options
import re # subst_func
def set_options(opt):
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
def configure(conf):
conf.check_pkg('dbus-1', pkgvars=['session_bus_services_dir'])
# conf.check_pkg('dbus-1', pkgvars=['session_bus_services_dir'])
# Needs a fix : nedko ??
conf.check_cfg(package='dbus-1', pkgvars=['session_bus_services_dir'])
if Params.g_options.enable_pkg_config_dbus_service_dir:
if Options.options.enable_pkg_config_dbus_service_dir:
conf.env['DBUS_SERVICES_DIR'] = conf.env['DBUS-1_SESSION_BUS_SERVICES_DIR'][0]
else:
conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services')
conf.check_tool('misc')
e = conf.create_header_configurator()
e.name = 'expat.h'
e.define = 'HAVE_EXPAT'
e.run()
conf.check(header_name='expat.h', define_name="HAVE_EXPAT")
if conf.is_defined('HAVE_EXPAT'):
conf.env['LIB_EXPAT'] = ['expat']
conf.env['BUILD_JACKDBUS'] = conf.is_defined('HAVE_EXPAT') and conf.is_defined('HAVE_DBUS_1')
# by default waf subst tool uses @VAR@ while scons legacy is ${VAR}
# so we use same template as scons for now
def subst_func(tsk):
"Substitutes variables in a .in file"
m4_re = re.compile('\$\{(\w+)\}', re.M)
env = tsk.env()
infile = tsk.m_inputs[0].abspath(env)
outfile = tsk.m_outputs[0].abspath(env)
file = open(infile, 'r')
code = file.read()
file.close()
s = m4_re.sub(r'%(\1)s', code)
dict = tsk.dict
if not dict:
names = m4_re.findall(code)
for i in names:
if env[i] and type(env[i]) is types.ListType :
dict[i] = " ".join(env[i])
else: dict[i] = env[i]
file = open(outfile, 'w')
file.write(s % dict)
file.close()
return 0
def build(bld):
if bld.env()["BUILD_JACKDBUS"] != True:
if bld.env["BUILD_JACKDBUS"] != True:
return
obj = bld.create_obj('cc', 'program')
if bld.env()['IS_LINUX']:
obj = bld.new_task_gen('cc', 'program')
if bld.env['IS_LINUX']:
sysdeps_dbus_include = ['../linux', '../posix']
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
sysdeps_dbus_include = ['../macosx', '../posix']
obj.includes = sysdeps_dbus_include + ['.', '../', '../common', '../common/jack']
......@@ -85,18 +53,18 @@ def build(bld):
'xml_write_raw.c',
'sigsegv.c',
]
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
obj.uselib = 'PTHREAD DL RT DBUS-1 EXPAT'
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
obj.uselib = 'PTHREAD DL DBUS-1 EXPAT'
obj.uselib_local = 'serverlib'
obj.target = 'jackdbus'
# process org.jackaudio.service.in -> org.jackaudio.service
obj = bld.create_obj('subst')
import misc
obj = bld.new_task_gen('subst')
obj.source = 'org.jackaudio.service.in'
obj.target = 'org.jackaudio.service'
obj.dict = {'BINDIR': bld.env()['PREFIX'] + '/bin'}
obj.inst_var = bld.env()['DBUS_SERVICES_DIR']
obj.inst_dir = '/'
obj.fun = subst_func # @VAR@ -> ${VAR}
obj.dict = {'BINDIR': bld.env['PREFIX'] + '/bin'}
obj.install_path = '${DBUS_SERVICES_DIR}/'
obj.fun = misc.subst_func
......@@ -27,26 +27,17 @@ example_libs = {
}
def configure(conf):
e = conf.create_header_configurator()
e.name = 'sndfile.h'
e.define = 'HAVE_SNDFILE'
e.run()
e = conf.check_cc(header_name='sndfile.h', define_name="HAVE_SNDFILE")
if conf.is_defined('HAVE_SNDFILE'):
conf.env['LIB_SNDFILE'] = ['sndfile']
e = conf.create_header_configurator()
e.name = 'ncurses.h'
e.define = 'HAVE_NCURSES'
e.run()
e = conf.check_cc(header_name='ncurses.h', define_name="HAVE_NCURSES")
if conf.is_defined('HAVE_NCURSES'):
conf.env['LIB_NCURSES'] = ['ncurses']
e = conf.create_library_configurator()
e.name = 'readline'
e.define = 'HAVE_READLINE'
e.run()
e = conf.check_cc(lib='readline', define_name="HAVE_READLINE")
if conf.is_defined('HAVE_READLINE'):
conf.env['LIB_READLINE'] = ['readline']
......@@ -56,20 +47,20 @@ def configure(conf):
conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.is_defined('HAVE_SNDFILE')
def build(bld):
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
os_incdir = ['../linux', '../posix']
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
os_incdir = ['../macosx', '../posix']
for example_program, example_program_source in example_programs.items():
prog = bld.create_obj('cpp', 'program')
prog = bld.new_task_gen('cxx', 'program')
prog.features.append('cc')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = example_program_source
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
prog.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#prog.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
prog.env.append_value("LINKFLAGS", "")
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
prog.uselib = 'RT'
if example_program == 'jack_server_control':
prog.uselib_local = 'serverlib'
......@@ -77,51 +68,50 @@ def build(bld):
prog.uselib_local = 'clientlib'
prog.target = example_program
#if bld.env()['BUILD_EXAMPLE_CLIENT_TRANSPORT']
if bld.env()['BUILD_EXAMPLE_CLIENT_TRANSPORT'] == True and bld.env()['IS_LINUX'] == True:
prog = bld.create_obj('cc', 'program')
#if bld.env['BUILD_EXAMPLE_CLIENT_TRANSPORT']
if bld.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] == True and bld.env['IS_LINUX'] == True:
prog = bld.new_task_gen('cc', 'program')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = 'transport.c'
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
prog.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#prog.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
prog.env.append_value("LINKFLAGS", "")
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
prog.uselib = 'RT READLINE NCURSES'
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
prog.uselib = 'READLINE NCURSES'
prog.uselib_local = 'clientlib'
prog.target = 'jack_transport'
if bld.env()['BUILD_EXAMPLE_CLIENT_REC'] == True:
prog = bld.create_obj('cc', 'program')
if bld.env['BUILD_EXAMPLE_CLIENT_REC'] == True:
prog = bld.new_task_gen('cc', 'program')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = 'capture_client.c'
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
prog.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#prog.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
prog.env.append_value("LINKFLAGS", "")
if bld.env()['IS_LINUX']:
if bld.env['IS_LINUX']:
prog.uselib = 'RT SNDFILE'
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
prog.uselib = 'SNDFILE'
prog.uselib_local = 'clientlib'
prog.target = 'jack_rec'
for example_lib, example_lib_source in example_libs.items():
lib = bld.create_obj('cc', 'shlib')
lib = bld.new_task_gen('cc', 'shlib')
lib.env['shlib_PATTERN'] = '%s.so'
lib.includes = os_incdir + ['../common/jack', '../common']
lib.target = example_lib
lib.source = example_lib_source
if bld.env()['IS_MACOSX']:
if bld.env['IS_MACOSX']:
lib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
#lib.env.append_value("LINKFLAGS", "-arch i386 -arch ppc")
lib.env.append_value("LINKFLAGS", "")
lib.uselib_local = 'serverlib'
lib.inst_var = bld.env()['ADDON_DIR']
lib.inst_dir = '/'
lib.install_path = '${ADDON_DIR}/'
symlink_as('PREFIX', 'jack_connect', 'bin/jack_disconnect')
bld.symlink_as('${PREFIX}/jack_connect', 'bin/jack_disconnect')
install_files('PREFIX', 'bin', 'jack_control', chmod=0755)
bld.install_files('${PREFIX}/bin', 'jack_control', chmod=0755)
prefix=${PREFIX}
exec_prefix=${PREFIX}
libdir=${LIBDIR}
includedir=${INCLUDEDIR}
server_libs=-L${LIBDIR} -l${SERVERLIB}
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@LIBDIR@
includedir=@INCLUDEDIR@
server_libs=-L@LIBDIR@ -l@SERVERLIB@
Name: jack
Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server
Version: ${JACK_VERSION}
Libs: -L${LIBDIR} -ljack
Cflags: -I${INCLUDEDIR}
Version: @JACK_VERSION@
Libs: -L@LIBDIR@ -ljack
Cflags: -I@INCLUDEDIR@
......@@ -2,31 +2,30 @@
# encoding: utf-8
def configure(conf):
conf.check_pkg('alsa', vnum = '1.0.0')
conf.check_cfg(package='alsa', atleast_version='1.0.0', args='--cflags --libs')
conf.env['BUILD_DRIVER_ALSA'] = conf.is_defined('HAVE_ALSA')
conf.check_pkg('libfreebob', vnum = '1.0.0')
conf. check_cfg(package='libfreebob', atleast_version='1.0.0', args='--cflags --libs')
conf.env['BUILD_DRIVER_FREEBOB'] = conf.is_defined('HAVE_LIBFREEBOB')
conf.check_pkg('libffado', vnum = '1.999.17')
conf. check_cfg(package='libffado', atleast_version='1.999.17', args='--cflags --libs')
conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver = bld.new_task_gen('cxx', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
driver.includes = ['.', '../linux', '../posix', '../common', '../common/jack']
driver.target = target
driver.source = sources
driver.inst_var = bld.env()['ADDON_DIR']
driver.inst_dir = '/'
driver.install_path = '${ADDON_DIR}/'
if uselib:
driver.uselib = uselib
return driver
def build(bld):
jackd = bld.create_obj('cpp', 'program')
jackd = bld.new_task_gen('cxx', 'program')
jackd.includes = ['../linux', '../posix', '../common/jack', '../common']
jackd.defines = 'HAVE_CONFIG_H'
jackd.source = ['../common/Jackdmp.cpp']
......@@ -36,7 +35,7 @@ def build(bld):
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
if bld.env()['BUILD_DRIVER_ALSA'] == True:
if bld.env['BUILD_DRIVER_ALSA'] == True:
create_jack_driver_obj(bld, 'alsa', ['alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
......@@ -48,10 +47,10 @@ def build(bld):
'alsa/ice1712.c'
], "ALSA")
if bld.env()['BUILD_DRIVER_FREEBOB'] == True:
if bld.env['BUILD_DRIVER_FREEBOB'] == True:
create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp', "LIBFREEBOB")
if bld.env()['BUILD_DRIVER_FFADO'] == True:
if bld.env['BUILD_DRIVER_FFADO'] == True:
create_jack_driver_obj(bld, 'firewire', 'firewire/JackFFADODriver.cpp', "LIBFFADO")
create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')
......
......@@ -2,30 +2,31 @@
# encoding: utf-8
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver = bld.new_task_gen('cxx', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
driver.includes = ['.', '../macosx', '../posix', '../common', '../common/jack']
driver.target = target
driver.source = sources
driver.inst_var = bld.env()['ADDON_DIR']
driver.inst_dir = '/'
driver.install_path = '${ADDON_DIR}/'
driver.uselib_local = 'serverlib'
if uselib:
driver.uselib = uselib
return driver
def create_jack_audio_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver = bld.new_task_gen('cxx', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = 'HAVE_CONFIG_H'
driver.includes = ['.', '../macosx', '../posix', '../common', '../common/jack']
driver.target = target
driver.source = sources
driver.inst_var = bld.env()['ADDON_DIR']
driver.inst_dir = '/'
#steph
#driver.inst_var = bld.env['ADDON_DIR']
#driver.inst_dir = '/'
driver.install_path = '${ADDON_DIR}/'
driver.uselib_local = 'serverlib'
driver.env.append_value("LINKFLAGS", "-framework CoreAudio -framework CoreServices -framework AudioUnit")
if uselib:
......@@ -33,7 +34,7 @@ def create_jack_audio_driver_obj(bld, target, sources, uselib = None):
return driver
def build(bld):