Newer
Older
#! /usr/bin/env python
# encoding: utf-8
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_NETLIB'] = conf.is_defined('HAVE_SAMPLERATE')
conf.env['BUILD_ADAPTER'] = conf.is_defined('HAVE_SAMPLERATE')
def create_jack_process_obj(bld, target, sources, uselib = None):
process = bld.new_task_gen('cxx', 'shlib')
sletz
committed
process.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
env_includes = ['../macosx', '../posix', '../macosx/coreaudio']
env_includes = ['../linux', '../posix', '../linux/alsa']
if bld.env['IS_SUN']:
env_includes = ['../solaris', '../posix', '../solaris/oss']
process.includes = ['.'] + env_includes + ['jack', '..']
process.name = target
process.target = target
process.source = sources
if bld.env['IS_LINUX']:
process.env.append_value("CPPFLAGS", "-fvisibility=hidden")
process.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64")
#process.env.append_value("LINKFLAGS", "-arch i386 -arch ppc -arch x86_64")
process.env.append_value("CPPFLAGS", "-fvisibility=hidden")
'JackActivationCount.cpp',
'JackAPI.cpp',
'JackClient.cpp',
'JackConnectionManager.cpp',
'JackFrameTimer.cpp',
'JackGraphManager.cpp',
'JackPort.cpp',
'JackPortType.cpp',
'JackAudioPort.cpp',
'JackMidiPort.cpp',
'JackMidiAPI.cpp',
'shm.c',
'JackGlobals.cpp',
'JackDebugClient.cpp',
'JackTransportEngine.cpp',
'timestamps.c',
'JackTools.cpp',
'JackMessageBuffer.cpp',
includes = ['.', './jack', '..']
common_libsources += [
'../posix/JackPosixThread.cpp',
'../posix/JackPosixSemaphore.cpp',
'../posix/JackProcessSync.cpp',
'../posix/JackSocket.cpp',
includes = ['../linux', '../posix'] + includes
uselib.append('RT')
if bld.env['IS_SUN']:
common_libsources += [
'../posix/JackPosixThread.cpp',
'../posix/JackFifo.cpp',
'../posix/JackProcessSync.cpp',
'../posix/JackSocket.cpp',
'../solaris/JackSolarisTime.c',
]
includes = ['../solaris', '../posix'] + includes
uselib.append('RT')
common_libsources += [
'../posix/JackProcessSync.cpp',
'../posix/JackPosixThread.cpp',
'../macosx/JackMachThread.cpp',
'../macosx/JackMachSemaphore.cpp',
includes = ['../macosx', '../macosx/RPC', '../posix'] + includes
serverlib = bld.new_task_gen('cxx', 'shlib')
serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
serverlib.includes = includes
serverlib.name = 'serverlib'
serverlib.target = 'jackserver'
serverlib.uselib = uselib
serverlib.install_path = '${LIBDIR}'
serverlib.source = [] + common_libsources
serverlib.source += [
'JackAudioDriver.cpp',
'JackTimedDriver.cpp',
'JackDriver.cpp',
'JackEngine.cpp',
'JackExternalClient.cpp',
'JackFreewheelDriver.cpp',
'JackInternalClient.cpp',
'JackServer.cpp',
'JackThreadedDriver.cpp',
'JackRestartThreadedDriver.cpp',
'JackWaitThreadedDriver.cpp',
'JackServerAPI.cpp',
'JackDriverLoader.cpp',
'JackServerGlobals.cpp',
'JackNetTool.cpp',
'JackArgParser.cpp',
'JackMidiAsyncQueue.cpp',
'JackMidiAsyncWaitQueue.cpp',
'JackMidiBufferReadQueue.cpp',
'JackMidiBufferWriteQueue.cpp',
'JackMidiRawInputWriteQueue.cpp',
'JackMidiRawOutputWriteQueue.cpp',
'JackMidiReadQueue.cpp',
'JackMidiReceiveQueue.cpp',
'JackMidiSendQueue.cpp',
'JackMidiUtil.cpp',
'JackMidiWriteQueue.cpp'
serverlib.source += [
'../posix/JackSocketServerChannel.cpp',
'../posix/JackSocketNotifyChannel.cpp',
'../posix/JackSocketServerNotifyChannel.cpp',
'../posix/JackNetUnixSocket.cpp',
]
if bld.env['IS_SUN']:
serverlib.source += [
'../posix/JackSocketServerChannel.cpp',
'../posix/JackSocketNotifyChannel.cpp',
'../posix/JackSocketServerNotifyChannel.cpp',
'../posix/JackNetUnixSocket.cpp',
]
serverlib.source += [
'../posix/JackSocketServerChannel.cpp',
'../posix/JackSocketNotifyChannel.cpp',
'../posix/JackSocketServerNotifyChannel.cpp',
'../posix/JackNetUnixSocket.cpp',
]
serverlib.vnum = bld.env['JACK_API_VERSION']
if bld.env['IS_LINUX']:
serverlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
serverlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
serverlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64")
#serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module -arch i386 -arch ppc -arch x86_64")
serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework CoreFoundation -framework vecLib -single_module")
serverlib.env.append_value("LINKFLAGS", "-compatibility_version 1 -current_version 1")
if bld.env['IS_SUN']:
serverlib.env.append_value("LINKFLAGS", "-lnsl -lsocket")
if bld.env['BUILD_NETLIB'] == True:
netlib = bld.new_task_gen('cxx', 'shlib')
netlib.features.append('cc')
netlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
netlib.includes = includes
netlib.name = 'netlib'
netlib.target = 'jacknet'
netlib.uselib = ['SAMPLERATE', 'CELT', 'PTHREAD' , 'RT']
netlib.install_path = '${LIBDIR}'
netlib.source = [
'JackNetAPI.cpp',
'JackNetInterface.cpp',
'JackNetTool.cpp',
'JackAudioAdapterInterface.cpp',
'JackLibSampleRateResampler.cpp',
'JackResampler.cpp',
'JackGlobals.cpp',
'ringbuffer.c']
if bld.env['IS_LINUX']:
netlib.source += ['../posix/JackNetUnixSocket.cpp','../posix/JackPosixThread.cpp', '../linux/JackLinuxTime.c']
netlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env['IS_SUN']:
netlib.source += ['../posix/JackNetUnixSocket.cpp','../posix/JackPosixThread.cpp', '../solaris/JackSolarisTime.c']
netlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env['IS_MACOSX']:
netlib.source += ['../posix/JackNetUnixSocket.cpp','../posix/JackPosixThread.cpp', '../macosx/JackMachThread.cpp', '../macosx/JackMachTime.c']
netlib.env.append_value("LINKFLAGS", "-framework CoreAudio -single_module")
netlib.vnum = bld.env['JACK_API_VERSION']
clientlib = bld.new_task_gen('cxx', 'shlib')
clientlib.features.append('cc')
clientlib.defines = 'HAVE_CONFIG_H'
clientlib.uselib = uselib
clientlib.install_path = '${LIBDIR}'
if bld.env['BUILD_JACKDBUS'] == True and bld.env['BUILD_JACKD'] == False:
clientlib.includes = includes
clientlib.name = 'clientlib'
clientlib.target = 'jack'
clientlib.source = [] + common_libsources
clientlib.source += [
'JackLibClient.cpp',
'JackLibAPI.cpp',
]
clientlib.source += [
'../posix/JackSocketClientChannel.cpp',
]
if bld.env['IS_SUN']:
clientlib.source += [
'../posix/JackSocketClientChannel.cpp',
'../posix/JackPosixServerLaunch.cpp',
]
clientlib.source += [
]
clientlib.vnum = bld.env['JACK_API_VERSION']
if bld.env['IS_LINUX']:
clientlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
clientlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
clientlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64")
#clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module -arch i386 -arch ppc -arch x86_64"
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
clientlib.env.append_value("LINKFLAGS", "-compatibility_version 1 -current_version 1")
if bld.env['IS_SUN']:
clientlib.env.append_value("LINKFLAGS", "-lnsl -lsocket")
if bld.env['BUILD_WITH_32_64']:
print "create 32bit lib..."
clientlib32bit = clientlib.clone('lib32')
create_jack_process_obj(bld, 'netmanager', 'JackNetManager.cpp', serverlib)
create_jack_process_obj(bld, 'profiler', 'JackProfiler.cpp', serverlib)
'JackResampler.cpp',
'JackLibSampleRateResampler.cpp',
'JackAudioAdapterInterface.cpp',
'JackNetAdapter.cpp',
]
process = create_jack_process_obj(bld, 'netadapter', net_adapter_sources, serverlib)
process.uselib = 'SAMPLERATE'
audio_adapter_sources = [
'JackResampler.cpp',
'JackLibSampleRateResampler.cpp',
'JackAudioAdapterFactory.cpp',
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'] and bld.env['BUILD_DRIVER_ALSA']:
audio_adapter_sources += ['../linux/alsa/JackAlsaAdapter.cpp']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.uselib = ['ALSA', 'SAMPLERATE']
if bld.env['BUILD_ADAPTER'] and bld.env['IS_SUN']:
audio_adapter_sources += ['../solaris/oss/JackOSSAdapter.cpp', 'memops.c']
process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
process.uselib = 'SAMPLERATE'
#audio_adapter_sources += ['../windows/JackPortAudioAdapter.cpp']
#process = create_jack_process_obj(bld, 'audioadapter', audio_adapter_sources, serverlib)
bld.install_files('${PREFIX}/include/jack', 'jack/*.h')
import misc
obj = bld.new_task_gen('subst')
obj.source = '../jack.pc.in'
obj.target = 'jack.pc'
obj.dict = {'PREFIX': bld.env['PREFIX'],
'INCLUDEDIR': os.path.normpath(bld.env['PREFIX'] + '/include'),
'JACK_VERSION': bld.env['JACK_VERSION'],
obj.install_path = '${LIBDIR}/pkgconfig/'