Browse Source

waf: improve drivers build script

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2422 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
nedko 14 years ago
parent
commit
a677f00a0d
5 changed files with 39 additions and 43 deletions
  1. +4
    -0
      linux/alsa/alsa_midi_jackmp.cpp
  2. +4
    -0
      linux/alsa/alsa_rawmidi.c
  3. +5
    -0
      linux/alsa/alsa_seqmidi.c
  4. +25
    -43
      linux/wscript
  5. +1
    -0
      wscript

+ 4
- 0
linux/alsa/alsa_midi_jackmp.cpp View File

@@ -16,6 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif

#include "JackAlsaDriver.h"
#include "JackPort.h"
#include "alsa_midi_impl.h"


+ 4
- 0
linux/alsa/alsa_rawmidi.c View File

@@ -18,6 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif

/* Required for clock_nanosleep(). Thanks, Nedko */
#define _GNU_SOURCE



+ 5
- 0
linux/alsa/alsa_seqmidi.c View File

@@ -37,6 +37,11 @@
* free deleted ports
* create new ports or mark existing as dead
*/

#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif

#include <alsa/asoundlib.h>
#include <jack/midiport.h>
#include <jack/ringbuffer.h>


+ 25
- 43
linux/wscript View File

@@ -11,6 +11,18 @@ def configure(conf):
conf.check_pkg('libffado', vnum = '1.999.17')
conf.env['BUILD_DRIVER_FFADO'] = conf.is_defined('HAVE_LIBFFADO')

def create_jack_driver_obj(bld, target, sources):
driver = bld.create_obj('cpp', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = 'HAVE_CONFIG_H'
driver.includes = ['.', '../common', '../common/jack']
driver.target = target
driver.source = sources
driver.inst_var = bld.env()['ADDON_DIR']
driver.inst_dir = '/'
return driver

def build(bld):
jackd = bld.create_obj('cpp', 'program')
jackd.includes = ['../common/jack', '../common']
@@ -19,52 +31,22 @@ def build(bld):
jackd.uselib_local = 'serverlib'
jackd.target = 'jackd'

driver_dummy = bld.create_obj('cpp', 'shlib')
driver_dummy.env['shlib_PATTERN'] = 'jack_%s.so'
driver_dummy.defines = 'HAVE_CONFIG_H'
driver_dummy.includes = ['../common/jack']
driver_dummy.target = 'dummy'
driver_dummy.source = '../common/JackDummyDriver.cpp'
driver_dummy.inst_var = bld.env()['ADDON_DIR']
driver_dummy.inst_dir = '/'
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')

if bld.env()['BUILD_DRIVER_ALSA'] == True:
driver_alsa = bld.create_obj('cpp', 'shlib')
driver_alsa.features.append('cc')
driver_alsa.env['shlib_PATTERN'] = 'jack_%s.so'
driver_alsa.defines = 'HAVE_CONFIG_H JACKMP'
driver_alsa.includes = ['.', '../common', '../common/jack']
driver_alsa.target = 'alsa'
driver_alsa.source = [
'alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
'alsa/alsa_midi_jackmp.cpp',
'alsa/memops.c',
'alsa/generic_hw.c',
'alsa/hdsp.c',
'alsa/hammerfall.c',
'alsa/ice1712.c'
]
driver_alsa.inst_var = bld.env()['ADDON_DIR']
driver_alsa.inst_dir = '/'
create_jack_driver_obj(bld, 'alsa', ['alsa/JackAlsaDriver.cpp',
'alsa/alsa_rawmidi.c',
'alsa/alsa_seqmidi.c',
'alsa/alsa_midi_jackmp.cpp',
'alsa/memops.c',
'alsa/generic_hw.c',
'alsa/hdsp.c',
'alsa/hammerfall.c',
'alsa/ice1712.c'
])

if bld.env()['BUILD_DRIVER_FREEBOB'] == True:
driver_freebob = bld.create_obj('cpp', 'shlib')
driver_freebob.env['shlib_PATTERN'] = 'jack_%s.so'
driver_freebob.defines = 'HAVE_CONFIG_H'
driver_freebob.includes = ['.', '../common', '../common/jack']
driver_freebob.target = 'freebob'
driver_freebob.source = 'freebob/JackFreebobDriver.cpp'
driver_freebob.inst_var = bld.env()['ADDON_DIR']
driver_freebob.inst_dir = '/'
create_jack_driver_obj(bld, 'freebob', 'freebob/JackFreebobDriver.cpp')

if bld.env()['BUILD_DRIVER_FFADO'] == True:
driver_ffado = bld.create_obj('cpp', 'shlib')
driver_ffado.env['shlib_PATTERN'] = 'jack_%s.so'
driver_ffado.defines = 'HAVE_CONFIG_H'
driver_ffado.includes = ['.', '../common', '../common/jack']
driver_ffado.target = 'firewire'
driver_ffado.source = 'firewire/JackFFADODriver.cpp'
driver_ffado.inst_var = bld.env()['ADDON_DIR']
driver_ffado.inst_dir = '/'
create_jack_driver_obj(bld, 'firewire', 'firewire/JackFFADODriver.cpp')

+ 1
- 0
wscript View File

@@ -62,6 +62,7 @@ def configure(conf):
conf.define('__SMP__', 1)
conf.define('USE_POSIX_SHM', 1)
conf.define('JACK_SVNREVISION', fetch_svn_revision('.'))
conf.define('JACKMP', 1)
if conf.env['BUILD_JACKDBUS'] == True:
conf.define('JACK_DBUS', 1)
conf.write_config_header('config.h')


Loading…
Cancel
Save