diff options
-rw-r--r-- | linux/alsa/alsa_midi_jackmp.cpp | 4 | ||||
-rw-r--r-- | linux/alsa/alsa_rawmidi.c | 4 | ||||
-rw-r--r-- | linux/alsa/alsa_seqmidi.c | 5 | ||||
-rw-r--r-- | linux/wscript | 68 | ||||
-rw-r--r-- | wscript | 1 |
5 files changed, 39 insertions, 43 deletions
diff --git a/linux/alsa/alsa_midi_jackmp.cpp b/linux/alsa/alsa_midi_jackmp.cpp index 1e276244..c984a696 100644 --- a/linux/alsa/alsa_midi_jackmp.cpp +++ b/linux/alsa/alsa_midi_jackmp.cpp @@ -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" diff --git a/linux/alsa/alsa_rawmidi.c b/linux/alsa/alsa_rawmidi.c index fbc82958..1a82a3b9 100644 --- a/linux/alsa/alsa_rawmidi.c +++ b/linux/alsa/alsa_rawmidi.c @@ -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 diff --git a/linux/alsa/alsa_seqmidi.c b/linux/alsa/alsa_seqmidi.c index 0eafe644..e5a99b72 100644 --- a/linux/alsa/alsa_seqmidi.c +++ b/linux/alsa/alsa_seqmidi.c @@ -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> diff --git a/linux/wscript b/linux/wscript index 050b42ed..4fb4f85b 100644 --- a/linux/wscript +++ b/linux/wscript @@ -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') @@ -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') |