Commit 1784d75a authored by nedko's avatar nedko
Browse files

Initial steps toward waf on macosx. libjack libjackserver and netmanager...

Initial steps toward waf on macosx. libjack libjackserver and netmanager inprocess client should build fine.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2504 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 75320c73
......@@ -49,8 +49,6 @@ def build(bld):
'JackFrameTimer.cpp',
'JackGraphManager.cpp',
'JackPort.cpp',
'JackPosixSemaphore.cpp',
'JackFifo.cpp',
'JackPortType.cpp',
'JackAudioPort.cpp',
'JackMidiPort.cpp',
......@@ -69,14 +67,33 @@ def build(bld):
'JackMessageBuffer.cpp',
'JackProcessSync.cpp',
]
includes = ['.', './jack', '..']
uselib = ["PTHREAD"]
if bld.env()['IS_LINUX']:
common_libsources += [
'JackPosixSemaphore.cpp',
'JackFifo.cpp',
]
includes.append('../linux')
uselib.append('RT')
if bld.env()['IS_MACOSX']:
common_libsources += [
'../macosx/JackMachSemaphore.cpp',
'../macosx/JackMachThread.cpp',
'../macosx/JackMachPort.cpp',
]
includes += ['../macosx', '../macosx/RPC']
serverlib = bld.create_obj('cpp', 'shlib')
serverlib.features.append('cc')
serverlib.defines = 'HAVE_CONFIG_H'
serverlib.includes = ['.', './jack', '..', '../linux']
serverlib.includes = includes
serverlib.name = 'serverlib'
serverlib.target = 'jackserver'
serverlib.uselib = ['RT', "PTHREAD"]
serverlib.uselib = uselib
serverlib.source = [] + common_libsources
serverlib.source += [
'JackAudioDriver.cpp',
......@@ -89,36 +106,66 @@ def build(bld):
'JackServer.cpp',
'JackThreadedDriver.cpp',
'JackWaitThreadedDriver.cpp',
'JackSocketServerChannel.cpp',
'JackSocketNotifyChannel.cpp',
'JackSocketServerNotifyChannel.cpp',
'JackServerAPI.cpp',
'JackDriverLoader.cpp',
'JackServerGlobals.cpp',
'JackControl.cpp',
'JackNetTool.cpp',
'JackNetTool.cpp',
]
if bld.env()['IS_LINUX']:
serverlib.source += [
'JackSocketServerChannel.cpp',
'JackSocketNotifyChannel.cpp',
'JackSocketServerNotifyChannel.cpp',
]
if bld.env()['IS_MACOSX']:
serverlib.source += [
'../macosx/JackMachServerChannel.cpp',
'../macosx/JackMachNotifyChannel.cpp',
'../macosx/JackMachServerNotifyChannel.cpp',
'../macosx/JackMacEngineRPC.cpp',
'../macosx/RPC/JackRPCClientUser.c',
]
serverlib.vnum = bld.env()['JACK_API_VERSION']
serverlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib")
clientlib = bld.create_obj('cpp', 'shlib')
clientlib.features.append('cc')
clientlib.defines = 'HAVE_CONFIG_H'
clientlib.uselib = ['RT', "PTHREAD"]
clientlib.uselib = uselib
if bld.env()['BUILD_JACKDBUS'] == True:
clientlib.uselib.append('DBUS-1')
clientlib.includes = ['.', './jack', '..', '../linux']
clientlib.includes = includes
clientlib.name = 'clientlib'
clientlib.target = 'jack'
clientlib.source = [] + common_libsources
clientlib.source += [
'JackLibClient.cpp',
'JackLibAPI.cpp',
'JackSocketClientChannel.cpp',
'JackServerLaunch.cpp',
'JackServerLaunch.cpp',
]
if bld.env()['IS_LINUX']:
clientlib.source += [
'JackSocketClientChannel.cpp',
]
if bld.env()['IS_MACOSX']:
clientlib.source += [
'../macosx/JackMachClientChannel.cpp',
'../macosx/RPC/JackRPCEngineUser.c',
'../macosx/JackMacLibClientRPC.cpp',
]
clientlib.vnum = bld.env()['JACK_API_VERSION']
clientlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib")
netmanagerlib = bld.create_obj('cpp', 'shlib')
netmanagerlib.env['shlib_PATTERN'] = '%s.so'
......@@ -129,6 +176,8 @@ def build(bld):
netmanagerlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
netmanagerlib.inst_var = bld.env()['ADDON_DIR']
netmanagerlib.inst_dir = '/'
if bld.env()['IS_MACOSX']: # is this really macosx sepcific?
netmanagerlib.uselib_local = serverlib.name
install_files('PREFIX', 'include/jack', 'jack/*.h')
......
......@@ -48,11 +48,22 @@ def set_options(opt):
opt.sub_options('linux/dbus')
def configure(conf):
platform = conf.detect_platform()
conf.env['IS_MACOSX'] = platform == 'darwin'
conf.env['IS_LINUX'] = platform == 'linux'
if conf.env['IS_LINUX']:
Params.pprint('CYAN', "Linux detected")
if conf.env['IS_MACOSX']:
Params.pprint('CYAN', "MacOS X detected")
conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc')
conf.sub_config('common')
conf.sub_config('linux')
if conf.env['IS_LINUX']:
conf.sub_config('linux')
if Params.g_options.dbus:
conf.sub_config('linux/dbus')
conf.sub_config('example-clients')
......@@ -67,7 +78,10 @@ def configure(conf):
conf.define('ADDON_DIR', os.path.normpath(conf.env['PREFIX'] + '/lib/jack'))
conf.define('JACK_LOCATION', os.path.normpath(conf.env['PREFIX'] + '/bin'))
conf.define('SOCKET_RPC_FIFO_SEMA', 1)
if conf.env['IS_LINUX']:
conf.define('SOCKET_RPC_FIFO_SEMA', 1)
if conf.env['IS_MACOSX']:
conf.define('MACH_RPC_MACH_SEMA', 1)
conf.define('__SMP__', 1)
conf.define('USE_POSIX_SHM', 1)
conf.define('JACK_SVNREVISION', fetch_svn_revision('.'))
......@@ -82,10 +96,11 @@ def configure(conf):
display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
display_msg("Drivers directory", conf.env['ADDON_DIR'], 'CYAN')
display_feature('Build doxygen documentation', conf.env['BUILD_DOXYGEN_DOCS'])
display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
display_feature('Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'] == True)
if conf.env['IS_LINUX']:
display_feature('Build with ALSA support', conf.env['BUILD_DRIVER_ALSA'] == True)
display_feature('Build with FireWire (FreeBob) support', conf.env['BUILD_DRIVER_FREEBOB'] == True)
display_feature('Build with FireWire (FFADO) support', conf.env['BUILD_DRIVER_FFADO'] == True)
display_feature('Build D-Bus JACK (jackdbus)', conf.env['BUILD_JACKDBUS'] == True)
if conf.env['BUILD_JACKDBUS'] == True:
display_msg('D-Bus service install directory', conf.env['DBUS_SERVICES_DIR'], 'CYAN')
#display_msg('Settings persistence', xxx)
......@@ -107,11 +122,12 @@ def configure(conf):
def build(bld):
# process subfolders from here
bld.add_subdirs('common')
bld.add_subdirs('linux')
if bld.env()['BUILD_JACKDBUS'] == True:
bld.add_subdirs('linux/dbus')
bld.add_subdirs('example-clients')
bld.add_subdirs('tests')
if bld.env()['IS_LINUX']:
bld.add_subdirs('linux')
if bld.env()['BUILD_JACKDBUS'] == True:
bld.add_subdirs('linux/dbus')
bld.add_subdirs('example-clients')
bld.add_subdirs('tests')
if bld.env()['BUILD_DOXYGEN_DOCS'] == True:
share_dir = Params.g_build.env()['PREFIX'] + '/share/jack-audio-connection-kit'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment