Browse Source

Pieter Palmers FFADO driver and scons based build(2)

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1726 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.69
sletz 17 years ago
parent
commit
eb73870e23
4 changed files with 745 additions and 0 deletions
  1. +313
    -0
      common/SConscript
  2. +172
    -0
      example-clients/SConscript
  3. +156
    -0
      linux/SConscript
  4. +104
    -0
      tests/SConscript

+ 313
- 0
common/SConscript View File

@@ -0,0 +1,313 @@
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originally was part of FFADO
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
import glob
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common", "#/common/jack"] )

#
# Define the source files
#

srcfiles_common_serverlib = env.Split( '\
JackActivationCount.cpp JackAPI.cpp JackAudioDriver.cpp JackClient.cpp JackConnectionManager.cpp \
JackDriver.cpp JackEngine.cpp JackEngineControl.cpp JackError.c JackExternalClient.cpp JackFrameTimer.cpp \
JackFreewheelDriver.cpp JackGlobalsServer.cpp JackGraphManager.cpp JackInternalClient.cpp JackPort.cpp JackPosixSemaphore.cpp \
JackPosixThread.cpp JackFifo.cpp JackLoopbackDriver.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp \
JackServer.cpp JackShmMem.cpp JackThreadedDriver.cpp shm.c JackSocket.cpp JackSocketServerChannel.cpp JackSocketNotifyChannel.cpp \
JackSocketServerNotifyChannel.cpp JackTime.c JackServerAPI.cpp JackGlobals.cpp JackDriverLoader.cpp JackDebugClient.cpp \
JackTransportEngine.cpp JackServerGlobals.cpp JackServerLaunch.cpp timestamps.c JackTools.cpp \
')

# FIXME: this is not pretty
srcfiles_common_serverlib.append('#/example-clients/internal_metro.cpp')

srcfiles_common_clientlib = env.Split( '\
JackActivationCount.cpp JackAPI.cpp JackClient.cpp JackConnectionManager.cpp ringbuffer.c JackServerLaunch.cpp\
JackError.c JackFrameTimer.cpp JackGlobalsClient.cpp JackGraphManager.cpp JackLibClient.cpp JackLibAPI.cpp JackPort.cpp JackPosixSemaphore.cpp \
JackFifo.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp JackMidiAPI.cpp JackEngineControl.cpp JackPosixThread.cpp JackShmMem.cpp \
shm.c JackSocket.cpp JackSocketClientChannel.cpp JackTime.c JackGlobals.cpp JackDebugClient.cpp JackTransportEngine.cpp timestamps.c JackTools.cpp \
')

srcfiles_common_wrapperlib = ['JackAPIWrapper.cpp', 'ringbuffer.c']

jack_headers = env.Split( 'intclient.h jack.h midiport.h ringbuffer.h \
statistics.h thread.h transport.h types.h')

#
# Start building
#

#pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
#env.Install( env['libdir'] + '/pkgconfig', pkgconfig )

env.AppendUnique( LIBS=["rt", "pthread"] )

# build the common stuff
clientlib = env.SharedLibrary( "jackmp", srcfiles_common_clientlib )
env.Install( "$libdir", clientlib )
serverlib = env.SharedLibrary( "jackdmp", srcfiles_common_serverlib )
env.Install( "$libdir", serverlib )
wrapperlib = env.SharedLibrary( "jackwrapper", srcfiles_common_wrapperlib )
env.Install( "$libdir", wrapperlib )


# install the headers
#if env['JACK_FLAGS']:
#jack_include_dir = env['JACK_INCLUDEDIR']
#if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_include_dir ):
#if env.GetOption('clean'):
#pass
#else:
#jack_old_includes_dir = env['includedir'] + '/jack_up'
#print "moving old jack includes to %s..." % jack_old_includes_dir
#env.Command(jack_old_includes_dir, jack_include_dir, Move("$TARGET", "$SOURCE"))

for header in jack_headers:
env.Alias("install", env.Install( env['includedir'] + '/jack', 'jack/' + header ))


# install the libs
env.Alias("install", env.Install(env['libdir'], serverlib))
env.Alias("install", env.Install(env['libdir'], clientlib))
env.Alias("install", env.Install(env['libdir'], wrapperlib))
#jack_libdir = env['JACK_LIBDIR']
#libjackdmp_location = env['libdir'] + '/libjackmp.so'
#if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_libdir ):

#if env.GetOption('clean'):
##note: is this executed before the actual uninstall?
#lib_files = glob.glob(jack_libdir + '/libjack.so.*.up')
#for old_name in lib_files:
#new_name = old_name[:-3]
#print "restoring old jack lib %s to %s..." % (old_name, new_name)
#env.Command(Delete(new_name))
#env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
#else:
#lib_files = glob.glob(jack_libdir + '/libjack.so.*')
#env.Alias("install", env.Install(env['libdir'], serverlib))
#env.Alias("install", env.Install(env['libdir'], clientlib))

#for old_name in lib_files:
#new_name = old_name + '.up'
#print "moving old jack lib %s to %s..." % (old_name, new_name)
#env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
#print " linking to %s..." % (libjackdmp_location)
#env.Command(old_name, libjackdmp_location, "ln -s $TARGET $SOURCE")
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originally was part of FFADO
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
import glob
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common", "#/common/jack"] )

#
# Define the source files
#

srcfiles_common_serverlib = env.Split( '\
JackActivationCount.cpp JackAPI.cpp JackAudioDriver.cpp JackClient.cpp JackConnectionManager.cpp \
JackDriver.cpp JackEngine.cpp JackEngineControl.cpp JackError.c JackExternalClient.cpp JackFrameTimer.cpp \
JackFreewheelDriver.cpp JackGlobalsServer.cpp JackGraphManager.cpp JackInternalClient.cpp JackPort.cpp JackPosixSemaphore.cpp \
JackPosixThread.cpp JackFifo.cpp JackLoopbackDriver.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp \
JackServer.cpp JackShmMem.cpp JackThreadedDriver.cpp shm.c JackSocket.cpp JackSocketServerChannel.cpp JackSocketNotifyChannel.cpp \
JackSocketServerNotifyChannel.cpp JackTime.c JackServerAPI.cpp JackGlobals.cpp JackDriverLoader.cpp JackDebugClient.cpp \
JackTransportEngine.cpp JackServerGlobals.cpp JackServerLaunch.cpp timestamps.c JackTools.cpp \
')

# FIXME: this is not pretty
srcfiles_common_serverlib.append('#/example-clients/internal_metro.cpp')

srcfiles_common_clientlib = env.Split( '\
JackActivationCount.cpp JackAPI.cpp JackClient.cpp JackConnectionManager.cpp ringbuffer.c JackServerLaunch.cpp\
JackError.c JackFrameTimer.cpp JackGlobalsClient.cpp JackGraphManager.cpp JackLibClient.cpp JackLibAPI.cpp JackPort.cpp JackPosixSemaphore.cpp \
JackFifo.cpp JackPortType.cpp JackAudioPort.cpp JackMidiPort.cpp JackMidiAPI.cpp JackEngineControl.cpp JackPosixThread.cpp JackShmMem.cpp \
shm.c JackSocket.cpp JackSocketClientChannel.cpp JackTime.c JackGlobals.cpp JackDebugClient.cpp JackTransportEngine.cpp timestamps.c JackTools.cpp \
')

srcfiles_common_wrapperlib = ['JackAPIWrapper.cpp', 'ringbuffer.c']

jack_headers = env.Split( 'intclient.h jack.h midiport.h ringbuffer.h \
statistics.h thread.h transport.h types.h')

#
# Start building
#

#pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
#env.Install( env['libdir'] + '/pkgconfig', pkgconfig )

env.AppendUnique( LIBS=["rt", "pthread"] )

# build the common stuff
clientlib = env.SharedLibrary( "jackmp", srcfiles_common_clientlib )
env.Install( "$libdir", clientlib )
serverlib = env.SharedLibrary( "jackdmp", srcfiles_common_serverlib )
env.Install( "$libdir", serverlib )
wrapperlib = env.SharedLibrary( "jackwrapper", srcfiles_common_wrapperlib )
env.Install( "$libdir", wrapperlib )


# install the headers
#if env['JACK_FLAGS']:
#jack_include_dir = env['JACK_INCLUDEDIR']
#if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_include_dir ):
#if env.GetOption('clean'):
#pass
#else:
#jack_old_includes_dir = env['includedir'] + '/jack_up'
#print "moving old jack includes to %s..." % jack_old_includes_dir
#env.Command(jack_old_includes_dir, jack_include_dir, Move("$TARGET", "$SOURCE"))

for header in jack_headers:
env.Alias("install", env.Install( env['includedir'] + '/jack', 'jack/' + header ))


# install the libs
env.Alias("install", env.Install(env['libdir'], serverlib))
env.Alias("install", env.Install(env['libdir'], clientlib))
env.Alias("install", env.Install(env['libdir'], wrapperlib))
#jack_libdir = env['JACK_LIBDIR']
#libjackdmp_location = env['libdir'] + '/libjackmp.so'
#if 'install' in COMMAND_LINE_TARGETS and os.path.isdir( jack_libdir ):

#if env.GetOption('clean'):
##note: is this executed before the actual uninstall?
#lib_files = glob.glob(jack_libdir + '/libjack.so.*.up')
#for old_name in lib_files:
#new_name = old_name[:-3]
#print "restoring old jack lib %s to %s..." % (old_name, new_name)
#env.Command(Delete(new_name))
#env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
#else:
#lib_files = glob.glob(jack_libdir + '/libjack.so.*')
#env.Alias("install", env.Install(env['libdir'], serverlib))
#env.Alias("install", env.Install(env['libdir'], clientlib))

#for old_name in lib_files:
#new_name = old_name + '.up'
#print "moving old jack lib %s to %s..." % (old_name, new_name)
#env.Command(new_name, old_name, Move("$TARGET", "$SOURCE"))
#print " linking to %s..." % (libjackdmp_location)
#env.Command(old_name, libjackdmp_location, "ln -s $TARGET $SOURCE")
# -*- python -*-

import os
import os.path
import glob
#Import('env')

#CPPPATH = ['macosx', 'common']

objects_common_server_lib=Split("""
JackActivationCount.cpp
JackAPI.cpp
JackAudioDriver.cpp
JackClient.cpp
JackConnectionManager.cpp
JackDriver.cpp
JackEngine.cpp
JackEngineTiming.cpp
JackError.cpp
JackExternalClient.cpp
JackFrameTimer.cpp
JackFreewheelDriver.o
JackGlobalsServer.cpp
JackGraphManager.cpp
JackInternalClient.cpp
JackPort.cpp
JackPosixSemaphore.cpp
JackPosixThread.cpp
JackFifo.cpp
JackLoopbackDriver.cpp
JackServer.cpp
JackShmMem.cpp
JackThreadedDriver.cpp
shm.c
JackSocket.cpp
JackSocketServerChannel.cpp
JackSocketNotifyChannel.cpp
JackSocketServerNotifyChannel.cpp
JackTime.cpp
JackServerAPI.cpp
JackGlobals.cpp
JackDriverLoader.cpp
internal_metro.cpp
JackDebugClient.cpp
JackTransportEngine.cpp
JackServerGlobals.o
""")

objects_common_client_lib =Split("""
JackActivationCount.cpp
JackAPI.cpp
JackClient.cpp
JackConnectionManager.cpp
ringbuffer.cpp
JackError.cpp
JackFrameTimer.cpp
JackGlobalsClient.cpp
JackGraphManager.cpp
JackLibClient.cpp
JackLibAPI.cpp
JackPort.cpp
JackPosixSemaphore.cpp
JackFifo.cpp
JackPosixThread.cpp
JackShmMem.cpp
shm.c
JackSocket.cpp
JackSocketClientChannel.cpp
JackTime.cpp
JackGlobals.cpp
JackDebugClient.cpp
JackTransportEngine.cpp
""")


SharedLibrary('libjackdmp', objects_common_server_lib, CPPPATH = ['.','../macosx','jack'], CXXFLAGS=["-O3"])
SharedLibrary('libjackmp', objects_common_client_lib, CPPPATH = ['.','../macosx','jack'], CXXFLAGS=["-O3"])

+ 172
- 0
example-clients/SConscript View File

@@ -0,0 +1,172 @@
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common"] )

#
# Define the source files
#

example_client_programs = {
"jack_freewheel" : "freewheel.c",
"jack_connect" : "connect.c",
"jack_lsp" : "lsp.c",
"jack_metro" : "metro.c",
#"jack_midiseq" : "midiseq.c",
#"jack_midisine" : "midisine.c",
"jack_showtime" : "showtime.c",
"jack_simple_client" : "simple_client.c",
"jack_zombie" : "zombie.c",
"jack_load" : "ipload.c",
"jack_unload" : "ipunload.c",
}

example_client_libs = {
"inprocess" : "inprocess.c",
}

# link extra libs?
extra_libs = {}
for example_client_program in example_client_programs.keys():
extra_libs[example_client_program] = ["jackdmp", "dl"]

# special cases
extra_libs["jack_load"] = ["jackmp"]
extra_libs["jack_unload"] = ["jackmp"]

env['HAS_READLINE']=True
if env['HAS_READLINE']:
extra_libs["jack_transport"] = ["readline", "jackdmp", "dl"]
example_client_programs["jack_transport"] = "transport.c"

#
# Start building
#

# build the example clients
if env['BUILD_EXAMPLES']:
clientenv = env.Copy()
clientenv.PrependUnique( LIBPATH=env['build_base'] )

for example_client_program in example_client_programs.keys():
clientenv.Program(target=example_client_program,
source=env.Split( example_client_programs[example_client_program]),
LIBS=extra_libs[example_client_program] )
if env['INSTALL_EXAMPLES']:
clientenv.Install( "$bindir", example_client_program )

for example_client_lib in example_client_libs.keys():
clientenv.SharedLibrary(target=example_client_lib,
source=env.Split( example_client_libs[example_client_lib] ) )
if env['INSTALL_EXAMPLES']:
#clientenv.Install( "$libdir", example_client_lib )
pass
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common"] )

#
# Define the source files
#

example_client_programs = {
"jack_freewheel" : "freewheel.c",
"jack_connect" : "connect.c",
"jack_lsp" : "lsp.c",
"jack_metro" : "metro.c",
#"jack_midiseq" : "midiseq.c",
#"jack_midisine" : "midisine.c",
"jack_showtime" : "showtime.c",
"jack_simple_client" : "simple_client.c",
"jack_zombie" : "zombie.c",
"jack_load" : "ipload.c",
"jack_unload" : "ipunload.c",
}

example_client_libs = {
"inprocess" : "inprocess.c",
}

# link extra libs?
extra_libs = {}
for example_client_program in example_client_programs.keys():
extra_libs[example_client_program] = ["jackdmp", "dl"]

# special cases
extra_libs["jack_load"] = ["jackmp"]
extra_libs["jack_unload"] = ["jackmp"]

env['HAS_READLINE']=True
if env['HAS_READLINE']:
extra_libs["jack_transport"] = ["readline", "jackdmp", "dl"]
example_client_programs["jack_transport"] = "transport.c"

#
# Start building
#

# build the example clients
if env['BUILD_EXAMPLES']:
clientenv = env.Copy()
clientenv.PrependUnique( LIBPATH=env['build_base'] )

for example_client_program in example_client_programs.keys():
clientenv.Program(target=example_client_program,
source=env.Split( example_client_programs[example_client_program]),
LIBS=extra_libs[example_client_program] )
if env['INSTALL_EXAMPLES']:
clientenv.Install( "$bindir", example_client_program )

for example_client_lib in example_client_libs.keys():
clientenv.SharedLibrary(target=example_client_lib,
source=env.Split( example_client_libs[example_client_lib] ) )
if env['INSTALL_EXAMPLES']:
#clientenv.Install( "$libdir", example_client_lib )
pass

+ 156
- 0
linux/SConscript View File

@@ -0,0 +1,156 @@
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common", "#/common/jack", "#/linux"] )

#
# Define the source files
#

srcfiles_linux_server = ['#/common/Jackdmp.cpp']

srcfiles_linux_alsa = env.Split( '\
JackAlsaDriver.cpp memops.c generic_hw.c hdsp.c hammerfall.c ice1712.c')
for i in range(len(srcfiles_linux_alsa)):
srcfiles_linux_alsa[i] = 'alsa/%s' % srcfiles_linux_alsa[i]

srcfiles_linux_freebob = ['freebob/JackFreebobDriver.cpp']
srcfiles_linux_ffado = ['firewire/JackFFADODriver.cpp']
srcfiles_linux_dummy = ['#/common/JackDummyDriver.cpp']

#
# Start building
#

#pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
#env.Install( env['libdir'] + '/pkgconfig', pkgconfig )

# build the server and its backends
serverenv = env.Copy()
serverenv.PrependUnique( LIBPATH=env['build_base'] )
serverenv.PrependUnique( LIBS=["jackdmp", "dl"] )

server = serverenv.Program("jackdmp", srcfiles_linux_server)
serverenv.Install( env['bindir'], server )

drv = serverenv.SharedLibrary( "jack_dummy", srcfiles_linux_dummy )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_dummy.so", drv )

if env['ENABLE_ALSA']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['ALSA_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_alsa", srcfiles_linux_alsa )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_alsa.so", drv )

if env['ENABLE_FREEBOB']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['FREEBOB_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_freebob", srcfiles_linux_freebob )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_freebob.so", drv )

if env['ENABLE_FIREWIRE']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['FFADO_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_firewire", srcfiles_linux_ffado )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_firewire.so", drv )
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common", "#/common/jack", "#/linux"] )

#
# Define the source files
#

srcfiles_linux_server = ['#/common/Jackdmp.cpp']

srcfiles_linux_alsa = env.Split( '\
JackAlsaDriver.cpp memops.c generic_hw.c hdsp.c hammerfall.c ice1712.c')
for i in range(len(srcfiles_linux_alsa)):
srcfiles_linux_alsa[i] = 'alsa/%s' % srcfiles_linux_alsa[i]

srcfiles_linux_freebob = ['freebob/JackFreebobDriver.cpp']
srcfiles_linux_ffado = ['firewire/JackFFADODriver.cpp']
srcfiles_linux_dummy = ['#/common/JackDummyDriver.cpp']

#
# Start building
#

#pkgconfig = env.ScanReplace( "libjackmp.pc.in" )
#env.Install( env['libdir'] + '/pkgconfig', pkgconfig )

# build the server and its backends
serverenv = env.Copy()
serverenv.PrependUnique( LIBPATH=env['build_base'] )
serverenv.PrependUnique( LIBS=["jackdmp", "dl"] )

server = serverenv.Program("jackdmp", srcfiles_linux_server)
serverenv.Install( env['bindir'], server )

drv = serverenv.SharedLibrary( "jack_dummy", srcfiles_linux_dummy )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_dummy.so", drv )

if env['ENABLE_ALSA']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['ALSA_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_alsa", srcfiles_linux_alsa )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_alsa.so", drv )

if env['ENABLE_FREEBOB']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['FREEBOB_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_freebob", srcfiles_linux_freebob )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_freebob.so", drv )

if env['ENABLE_FIREWIRE']:
if not env.GetOption('clean'):
serverenv.MergeFlags( env['FFADO_FLAGS'] )
drv = serverenv.SharedLibrary( "jack_firewire", srcfiles_linux_ffado )
serverenv.InstallAs( env['libdir']+ "/jackmp/jack_firewire.so", drv )

+ 104
- 0
tests/SConscript View File

@@ -0,0 +1,104 @@
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common"] )

#
# Define the source files
#

test_programs = {
"synchroClient" : "testSynchroClient.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"synchroServer" : "testSynchroServer.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"synchroServerClient" : "testSynchroServerClient.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp #/common/JackPthreadCond.cpp",
"testSem" : "testSem.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"jack_test" : "jack_test.cpp",
}

#
# Start building
#

# build the tests
testenv = env.Copy()
testenv.PrependUnique( LIBPATH=env['build_base'] )
testenv.PrependUnique( LIBS="jackmp" )

for test_program in test_programs.keys():
testenv.Program(target=test_program,
source=env.Split( test_programs[test_program] ) )
#
# Copyright (C) 2007 Arnold Krille
# Copyright (C) 2007 Pieter Palmers
#
# This file originates from FFADO (www.ffado.org)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from string import Template

Import( 'env' )

# paths where include files can be found
env.AppendUnique( CPPPATH=["#/", "#/common"] )

#
# Define the source files
#

test_programs = {
"synchroClient" : "testSynchroClient.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"synchroServer" : "testSynchroServer.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"synchroServerClient" : "testSynchroServerClient.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp #/common/JackPthreadCond.cpp",
"testSem" : "testSem.cpp #/common/JackPosixSemaphore.cpp #/common/JackPosixThread.cpp #/common/JackError.c #/common/JackFifo.cpp",
"jack_test" : "jack_test.cpp",
}

#
# Start building
#

# build the tests
testenv = env.Copy()
testenv.PrependUnique( LIBPATH=env['build_base'] )
testenv.PrependUnique( LIBS="jackmp" )

for test_program in test_programs.keys():
testenv.Program(target=test_program,
source=env.Split( test_programs[test_program] ) )

Loading…
Cancel
Save