summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-17 22:12:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-17 22:12:21 +0000
commit7884727e78f9e2253b2b6d8ef441fa07272fe950 (patch)
tree4423ba4629082439a5c1be07e94682c1d3d41f80 /libs
parent0102b1dc93f0ad0a5ba5516cd3cc24b9cd8e240b (diff)
massive changes to waf build scripts so that nearly everything "should" be working now except for i18n (OSC is not quite right) ; some preliminary work on post-main-out handling, incomplete; a couple of fixes from -Wall and valgrind
git-svn-id: svn://localhost/ardour2/branches/3.0@5371 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/buffer_set.h3
-rw-r--r--libs/ardour/ardour/delivery.h13
-rw-r--r--libs/ardour/ardour/pitch.h4
-rw-r--r--libs/ardour/ardour/stretch.h4
-rw-r--r--libs/ardour/audio_diskstream.cc2
-rw-r--r--libs/ardour/delivery.cc89
-rw-r--r--libs/ardour/location.cc8
-rw-r--r--libs/ardour/midi_diskstream.cc2
-rw-r--r--libs/ardour/send.cc22
-rw-r--r--libs/ardour/session.cc3
-rw-r--r--libs/ardour/template_utils.cc2
-rw-r--r--libs/ardour/wscript59
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc19
-rw-r--r--libs/pbd/pbd/stacktrace.h18
-rw-r--r--libs/pbd/wscript9
-rw-r--r--libs/surfaces/control_protocol/wscript12
-rw-r--r--libs/surfaces/generic_midi/wscript12
-rw-r--r--libs/surfaces/osc/wscript21
-rw-r--r--libs/surfaces/powermate/wscript10
-rw-r--r--libs/surfaces/tranzport/wscript10
-rw-r--r--libs/surfaces/wscript24
21 files changed, 238 insertions, 108 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 1350a3c5ab..1c77918789 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -74,6 +74,7 @@ public:
void is_silent(bool yn) { _is_silent = yn; }
bool is_silent() const { return _is_silent; }
void silence (nframes_t nframes, nframes_t offset);
+ bool is_mirror() const { return _is_mirror; }
void set_count(const ChanCount& count) { assert(count <= _available); _count = count; }
@@ -169,7 +170,7 @@ private:
/// Available counts (number of buffers actually allocated)
ChanCount _available;
- /// Whether we (don't) 'own' the contained buffers (otherwise we mirror a PortSet)
+ /// False if we 'own' the contained buffers, if true we mirror a PortSet)
bool _is_mirror;
/// Whether the buffer set should be considered silent
diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h
index e46823d075..5cb11a9348 100644
--- a/libs/ardour/ardour/delivery.h
+++ b/libs/ardour/ardour/delivery.h
@@ -34,13 +34,20 @@ class Panner;
class Delivery : public IOProcessor {
public:
enum Role {
- Insert = 0x1,
+ /* main outputs - delivers out-of-place to port buffers, and cannot be removed */
+ Main = 0x1,
+ /* send - delivers to port buffers, leaves input buffers untouched */
Send = 0x2,
- Listen = 0x4,
- Main = 0x8,
+ /* insert - delivers to port buffers and receives in-place from port buffers */
+ Insert = 0x4,
+ /* listen - internal send used only to deliver to control/monitor bus */
+ Listen = 0x8,
+ /* aux - internal send used to deliver to any bus, by user request */
Aux = 0x10
};
+ static bool role_requires_output_ports (Role r) { return r == Main || r == Send || r == Insert; }
+
/* Delivery to an existing output */
Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role);
diff --git a/libs/ardour/ardour/pitch.h b/libs/ardour/ardour/pitch.h
index 3173f9ff23..589c370409 100644
--- a/libs/ardour/ardour/pitch.h
+++ b/libs/ardour/ardour/pitch.h
@@ -20,6 +20,10 @@
#ifndef __ardour_pitch_h__
#define __ardour_pitch_h__
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include "ardour/filter.h"
namespace ARDOUR {
diff --git a/libs/ardour/ardour/stretch.h b/libs/ardour/ardour/stretch.h
index 0b0de1be57..b878d4794e 100644
--- a/libs/ardour/ardour/stretch.h
+++ b/libs/ardour/ardour/stretch.h
@@ -20,6 +20,10 @@
#ifndef __ardour_stretch_h__
#define __ardour_stretch_h__
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include "ardour/filter.h"
#ifdef USE_RUBBERBAND
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 42467d540c..1e0e13a276 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -1953,7 +1953,7 @@ AudioDiskstream::get_state ()
Location* pi;
if (_session.config.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
- snprintf (buf, sizeof (buf), "%" PRIu32, pi->start());
+ snprintf (buf, sizeof (buf), "%" PRId64, pi->start());
} else {
snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame());
}
diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc
index 49f4569a1c..efe123c059 100644
--- a/libs/ardour/delivery.cc
+++ b/libs/ardour/delivery.cc
@@ -47,7 +47,7 @@ bool Delivery::panners_legal = false;
/* deliver to an existing IO object */
Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<MuteMaster> mm, const string& name, Role r)
- : IOProcessor(s, boost::shared_ptr<IO>(), (r == Listen ? boost::shared_ptr<IO>() : io), name)
+ : IOProcessor(s, boost::shared_ptr<IO>(), (role_requires_output_ports (r) ? io : boost::shared_ptr<IO>()), name)
, _role (r)
, _output_buffers (new BufferSet())
, _current_gain (1.0)
@@ -71,7 +71,7 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Mute
/* deliver to a new IO object */
Delivery::Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const string& name, Role r)
- : IOProcessor(s, false, (r == Listen ? false : true), name)
+ : IOProcessor(s, false, (role_requires_output_ports (r) ? true : false), name)
, _role (r)
, _output_buffers (new BufferSet())
, _current_gain (1.0)
@@ -184,17 +184,88 @@ Delivery::visible () const
bool
Delivery::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
{
- out = in;
- return true;
+ if (_role == Main) {
+
+ /* the out buffers will be set to point to the port output buffers
+ of our output object.
+ */
+
+ if (_output) {
+ if (_output->n_ports() != ChanCount::ZERO) {
+ out = _output->n_ports();
+ return true;
+ } else {
+ /* not configured yet - we will passthru */
+ out = in;
+ return true;
+ }
+ } else {
+ fatal << "programming error: this should never be reached" << endmsg;
+ /*NOTREACHED*/
+ }
+
+
+ } else if (_role == Insert) {
+
+ /* the output buffers will be filled with data from the *input* ports
+ of this Insert.
+ */
+
+ if (_input) {
+ if (_input->n_ports() != ChanCount::ZERO) {
+ out = _input->n_ports();
+ return true;
+ } else {
+ /* not configured yet - we will passthru */
+ out = in;
+ return true;
+ }
+ } else {
+ fatal << "programming error: this should never be reached" << endmsg;
+ /*NOTREACHED*/
+ }
+
+ } else {
+ fatal << "programming error: this should never be reached" << endmsg;
+ }
+
+ return false;
}
bool
Delivery::configure_io (ChanCount in, ChanCount out)
{
- if (out != in) { // always 1:1
- return false;
+ /* check configuration by comparison with our I/O port configuration, if appropriate.
+ see ::can_support_io_configuration() for comments
+ */
+
+ if (_role == Main) {
+
+ if (_output) {
+ if (_output->n_ports() != out) {
+ if (_output->n_ports() != ChanCount::ZERO) {
+ fatal << _name << " programming error: configure_io with nports = " << _output->n_ports() << " called with " << in << " and " << out << " with " << _output->n_ports() << " output ports" << endmsg;
+ /*NOTREACHED*/
+ } else {
+ /* I/O not yet configured */
+ }
+ }
+ }
+
+ } else if (_role == Insert) {
+
+ if (_input) {
+ if (_input->n_ports() != in) {
+ if (_input->n_ports() != ChanCount::ZERO) {
+ fatal << _name << " programming error: configure_io called with " << in << " and " << out << " with " << _input->n_ports() << " input ports" << endmsg;
+ /*NOTREACHED*/
+ } else {
+ /* I/O not yet configured */
+ }
+ }
+ }
}
-
+
if (!Processor::configure_io (in, out)) {
return false;
}
@@ -207,6 +278,8 @@ Delivery::configure_io (ChanCount in, ChanCount out)
void
Delivery::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
{
+ assert (_output);
+
if (!_active || _output->n_ports ().get (_output->default_type()) == 0) {
return;
}
@@ -270,7 +343,6 @@ Delivery::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nfra
}
}
-
XMLNode&
Delivery::state (bool full_state)
{
@@ -448,6 +520,7 @@ Delivery::target_gain ()
break;
case Send:
case Insert:
+ case Aux:
/* XXX FIX ME this is wrong, we need per-delivery muting */
mp = MuteMaster::PreFader;
break;
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index f6678966e4..43ffefaae1 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -336,9 +336,9 @@ Location::get_state (void)
id().print (buf, sizeof (buf));
node->add_property("id", buf);
node->add_property ("name", name());
- snprintf (buf, sizeof (buf), "%u", start());
+ snprintf (buf, sizeof (buf), "%" PRId64, start());
node->add_property ("start", buf);
- snprintf (buf, sizeof (buf), "%u", end());
+ snprintf (buf, sizeof (buf), "%" PRId64, end());
node->add_property ("end", buf);
node->add_property ("flags", enum_2_string (_flags));
node->add_property ("locked", (_locked ? "yes" : "no"));
@@ -385,14 +385,14 @@ Location::set_state (const XMLNode& node)
may make the value of _start illegal.
*/
- sscanf (prop->value().c_str(), "%" PRIu32, &_start);
+ sscanf (prop->value().c_str(), "%" PRId64, &_start);
if ((prop = node.property ("end")) == 0) {
error << _("XML node for Location has no end information") << endmsg;
return -1;
}
- sscanf (prop->value().c_str(), "%" PRIu32, &_end);
+ sscanf (prop->value().c_str(), "%" PRId64, &_end);
if ((prop = node.property ("flags")) == 0) {
error << _("XML node for Location has no flags information") << endmsg;
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc
index e0921d8916..aa6d77b000 100644
--- a/libs/ardour/midi_diskstream.cc
+++ b/libs/ardour/midi_diskstream.cc
@@ -1390,7 +1390,7 @@ MidiDiskstream::get_state ()
Location* pi;
if (_session.config.get_punch_in() && ((pi = _session.locations()->auto_punch_location()) != 0)) {
- snprintf (buf, sizeof (buf), "%" PRIu32, pi->start());
+ snprintf (buf, sizeof (buf), "%" PRId64, pi->start());
} else {
snprintf (buf, sizeof (buf), "%" PRIu32, _session.transport_frame());
}
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index 3d44070e68..a4db60fc68 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -147,22 +147,12 @@ Send::set_state(const XMLNode& node)
bool
Send::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
{
- if (_output->n_ports() == ChanCount::ZERO) {
-
- /* not configured yet, we can support anything */
-
- out = in;
- return true; /* we can support anything the first time we're asked */
-
- } else {
-
- /* for a send, processor input corresponds to IO output */
-
- out = in;
- return true;
- }
-
- return false;
+ /* sends have no impact at all on the channel configuration of the
+ streams passing through the route. so, out == in.
+ */
+
+ out = in;
+ return true;
}
/** Set up the XML description of a send so that its name is unique.
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index b1d33e948c..ba6353ae39 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3784,8 +3784,11 @@ Session::ensure_buffers (ChanCount howmany)
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
size_t count = std::max(_scratch_buffers->available().get(*t), howmany.get(*t));
+ cerr << "Ensure bufs for scratch at " << _scratch_buffers << " mirror ? " << _scratch_buffers->is_mirror() << endl;
_scratch_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
+ cerr << "Ensure bufs for mix at " << _mix_buffers << " mirror ? " << _mix_buffers->is_mirror() << endl;
_mix_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
+ cerr << "Ensure bufs for silent at " << _silent_buffers << " mirror ? " << _silent_buffers->is_mirror() << endl;
_silent_buffers->ensure_buffers (*t, count, _engine.raw_buffer_size(*t));
}
diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc
index a7a7eee321..daf133fa05 100644
--- a/libs/ardour/template_utils.cc
+++ b/libs/ardour/template_utils.cc
@@ -141,7 +141,7 @@ find_route_templates (vector<TemplateInfo>& template_names)
template_names.push_back (rti);
}
- free (templates);
+ delete templates;
}
}
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 6993412ce5..3ab48abf77 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -2,6 +2,7 @@
import autowaf
import os
import glob
+import Options
# Version of this package (even if built as a child)
MAJOR = '3'
@@ -28,17 +29,11 @@ path_prefix = 'libs/ardour/'
def set_options(opt):
autowaf.set_options(opt)
-def check_header_and_define(conf, header, define):
- conf.check(header_name=header, define_name=define)
- if conf.env[define]:
- conf.env.append_value('CCFLAGS', '-D' + define)
- conf.env.append_value('CXXFLAGS', '-D' + define)
-
def configure(conf):
autowaf.build_version_files(path_prefix+'ardour/version.h', path_prefix+'version.cc',
'libardour3', MAJOR, MINOR, MICRO)
autowaf.configure(conf)
- autowaf.check_tool(conf, 'compiler_cxx')
+ autowaf.check_tool(conf, 'compiler_cxx gas')
autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', atleast_version='0.3.2')
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
@@ -54,14 +49,24 @@ def configure(conf):
# we don't try to detect this, since its part of our source tree
- conf.env.append_value('CXXFLAGS', '-DUSE_RUBBERBAND')
- conf.define('HAVE_RUBBERBAND', 1)
-
- check_header_and_define(conf, 'sys/vfs.h', 'HAVE_SYS_VFS_H')
- check_header_and_define(conf, 'wordexp.h', 'HAVE_WORDEXP')
+ conf.define('HAVE_RUBBERBAND', 1) # controls whether we think we have it
+ conf.define('USE_RUBBERBAND', 1) # controls whether we actually use it
- conf.env.append_value('CCFLAGS', '-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE')
- conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
+ conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H')
+ conf.check(header_name='wordexp.h', define_name='HAVE_WORDEXP')
+
+ if conf.env['IS_OSX']:
+ conf.check_cc (header_name = '/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h',
+ linkflags = [ '-framework', 'CoreMIDI' ])
+
+ conf.check_cc (header_name = '/System/Library/Frameworks/AudioToolbox.framework/Headers/ExtendedAudioFile.h',
+ linkflags = [ '-framework', 'AudioToolbox' ])
+
+ conf.check_cc (header_name = '/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h',
+ define_name = 'HAVE_COREAUDIO')
+
+ conf.check_cc (header_name = '/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.h',
+ define_name = 'HAVE_AUDIOUNITS', linkflags = [ '-framework', 'AudioUnit' ])
conf.write_config_header('libardour-config.h')
@@ -188,6 +193,7 @@ def build(bld):
reverse.cc
route.cc
route_group.cc
+ rb_effect.cc
send.cc
session.cc
session_butler.cc
@@ -229,7 +235,7 @@ def build(bld):
obj.name = 'libardour'
obj.target = 'ardour'
obj.uselib = 'GLIBMM AUBIO SIGCPP XML UUID JACK SNDFILE SAMPLERATE LRDF'
- obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib'
+ obj.uselib_local = 'libpbd libmidipp libevoral libvamphost libvampplugin libtaglib librubberband'
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.cxxflags = ['-DPACKAGE="libardour3"']
@@ -240,14 +246,32 @@ def build(bld):
os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
obj.cxxflags += ['-DVAMP_DIR="' + os.path.join(
os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"']
- obj.source += ' rb_effect.cc '
- obj.uselib_local += ' librubberband '
#obj.source += ' st_stretch.cc st_pitch.cc '
#obj.uselib += ' SOUNDTOUCH '
if bld.env['HAVE_SLV2']:
obj.source += ' lv2_plugin.cc lv2_event_buffer.cc uri_map.cc '
obj.uselib += ' SLV2 '
+ if bld.env['VST']:
+ obj.source += ' vst_plugin.cc session_vst.cc '
+
+ if bld.env['HAVE_COREAUDIO'] and bld.env['COREAUDIO']:
+ obj.sources += ' coreaudio.cc caimportable.cc '
+
+ if bld.env['HAVE_AUDIOUNITS'] and bld.env['AUDIOUNITS']:
+ obj.sources += ' audio_unit.cc '
+
+ if bld.env['IS_OSX']:
+ # this avoids issues with circular dependencies between libardour and libardour_cp.
+ obj.linkflags += '-undefined suppress -flat_namespace'
+
+ if bld.env['FPU_OPTIMIZATION']:
+ obj.source += ' sse_functions_xmm.cc'
+ if bld.env['build_target'] == 'i386' or bld.env['build_target'] == 'i686':
+ obj.source += ' sse_functions.S'
+ elif bld.env['build_target'] == 'x86_64':
+ obj.source += ' sse_functions_64bit.S'
+
if bld.env['HAVE_CPPUNIT']:
# Unit tests
testobj = bld.new_task_gen('cxx', 'program')
@@ -261,6 +285,7 @@ def build(bld):
testobj.target = 'run-tests'
testobj.install_path = ''
+
def shutdown():
autowaf.shutdown()
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 7b60d6ba52..bf85333541 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -220,7 +220,10 @@ UI::run (Receiver &old_receiver)
listen_to (warning);
listen_to (fatal);
- old_receiver.hangup ();
+ /* stop the old receiver (text/console) once we hit the first idle */
+
+ Glib::signal_idle().connect (bind_return (mem_fun (old_receiver, &Receiver::hangup), false));
+
starting ();
_active = true;
theMain->run ();
@@ -529,10 +532,10 @@ UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuffer::Tag
void
UI::handle_fatal (const char *message)
{
- Window win (WINDOW_POPUP);
- VBox packer;
+ Dialog win;
Label label (message);
Button quit (_("Press To Exit"));
+ HBox hpacker;
win.set_default_size (400, 100);
@@ -542,10 +545,12 @@ UI::handle_fatal (const char *message)
win.set_title (title);
win.set_position (WIN_POS_MOUSE);
- win.add (packer);
+ win.set_border_width (12);
+
+ win.get_vbox()->pack_start (label, true, true);
+ hpacker.pack_start (quit, true, false);
+ win.get_vbox()->pack_start (hpacker, false, false);
- packer.pack_start (label, true, true);
- packer.pack_start (quit, false, false);
quit.signal_clicked().connect(mem_fun(*this,&UI::quit));
win.show_all ();
@@ -553,7 +558,7 @@ UI::handle_fatal (const char *message)
theMain->run ();
- exit (1);
+ _exit (1);
}
void
diff --git a/libs/pbd/pbd/stacktrace.h b/libs/pbd/pbd/stacktrace.h
index 00cb253c70..40275fd536 100644
--- a/libs/pbd/pbd/stacktrace.h
+++ b/libs/pbd/pbd/stacktrace.h
@@ -20,24 +20,24 @@
#ifndef __libpbd_stacktrace_h__
#define __libpbd_stacktrace_h__
+#ifdef HAVE_WAFBUILD
+#include "libpbd-config.h"
+#endif
+
#include <iostream>
#include <ostream>
#include <glibmm/thread.h>
#include <list>
-namespace PBD {
- void stacktrace (std::ostream& out, int levels = 0);
- void trace_twb();
-
-#ifdef HAVE_WAFBUILD
-#include "libpbd-config.h"
-#endif
-
#ifdef HAVE_EXECINFO
#include <execinfo.h>
-#include <stdlib.h>
+#include <cstdlib>
#endif
+namespace PBD {
+ void stacktrace (std::ostream& out, int levels = 0);
+ void trace_twb();
+
template<typename T>
class thing_with_backtrace
{
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index ed9ef14c5c..cd1197fb17 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -37,9 +37,7 @@ def configure(conf):
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
-
- # This must be defined for libpbd only, it breaks ardour
- conf.check(header_name='execinfo.h', define_name='PBD_HAVE_EXECINFO')
+ conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO')
conf.write_config_header('libpbd-config.h')
@@ -92,8 +90,9 @@ def build(bld):
obj.vnum = LIBPBD_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.cxxflags = ['-DPACKAGE="libpbd"']
- if bld.env['PBD_HAVE_EXECINFO']:
- obj.cxxflags += ['-DHAVE_EXECINFO']
+
+ if bld.env['build_target'] == 'x86_64':
+ obj.cxxflags += [ '-DUSE_X86_64_ASM' ]
def shutdown():
autowaf.shutdown()
diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript
index c084e33696..e8354e58d4 100644
--- a/libs/surfaces/control_protocol/wscript
+++ b/libs/surfaces/control_protocol/wscript
@@ -6,7 +6,7 @@ import os
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
+LIBARDOUR_CP_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -25,13 +25,13 @@ def build(bld):
control_protocol.cc
smpte.cc
'''
- obj.export_incdirs = ['.']
+ obj.export_incdirs = ['.', './control_protocol' ]
obj.cxxflags = '-DPACKAGE="ardour_cp"'
- obj.includes = ['.']
- obj.name = 'libsurfaces'
- obj.target = 'surfaces'
+ obj.includes = ['.', './control_protocol']
+ obj.name = 'libardour_cp'
+ obj.target = 'ardourcp'
obj.uselib_local = 'libardour'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.vnum = LIBARDOUR_CP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():
diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript
index 4993d24ef9..c26643e656 100644
--- a/libs/surfaces/generic_midi/wscript
+++ b/libs/surfaces/generic_midi/wscript
@@ -6,7 +6,7 @@ import os
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
+LIBARDOUR_GENERIC_MIDI_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -25,13 +25,13 @@ def build(bld):
interface.cc
midicontrollable.cc
'''
- obj.export_incdirs = ['./generic_midi']
+ obj.export_incdirs = ['.']
obj.cxxflags = '-DPACKAGE="ardour_genericmidi"'
obj.includes = ['.', './generic_midi']
- obj.name = 'libgeneric_midi'
- obj.target = 'generic_midi'
- obj.uselib_local = 'libardour libsurfaces'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.name = 'libardour_generic_midi'
+ obj.target = 'ardour_generic_midi'
+ obj.uselib_local = 'libardour libardour_cp'
+ obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():
diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript
index 748b0f6940..d254d00313 100644
--- a/libs/surfaces/osc/wscript
+++ b/libs/surfaces/osc/wscript
@@ -2,18 +2,11 @@
import autowaf
import os
-# Version of this package (even if built as a child)
-LIBSURFACES_VERSION = '4.1.0'
-
# Library version (UNIX style major, minor, micro)
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
-
-# Variables for 'waf dist'
-APPNAME = 'libsurfaces'
-VERSION = LIBSURFACES_VERSION
+LIBARDOUR_OSC_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -24,6 +17,7 @@ def set_options(opt):
def configure(conf):
autowaf.configure(conf)
+ autowaf.check_pkg(conf, 'liblo', uselib_store='LO')
def build(bld):
obj = bld.new_task_gen('cxx', 'shlib')
@@ -32,13 +26,14 @@ def build(bld):
osc_controllable.cc
interface.cc
'''
- obj.export_incdirs = ['./osc']
+ obj.export_incdirs = ['.']
obj.cxxflags = '-DPACKAGE="ardour_cp"'
obj.includes = ['.', './osc']
- obj.name = 'libsurfaces'
- obj.target = 'surfaces'
- obj.uselib_local = 'libardour'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.name = 'libardour_osc'
+ obj.target = 'osc'
+ obj.uselib = ' LO '
+ obj.uselib_local = 'libardour libardour_cp'
+ obj.vnum = LIBARDOUR_OSC_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():
diff --git a/libs/surfaces/powermate/wscript b/libs/surfaces/powermate/wscript
index 3d08b1a40a..f8dd55c515 100644
--- a/libs/surfaces/powermate/wscript
+++ b/libs/surfaces/powermate/wscript
@@ -6,7 +6,7 @@ import os
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
+LIBARDOUR_POWERMATE_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -24,13 +24,13 @@ def build(bld):
interface.cc
powermate.cc
'''
- obj.export_incdirs = ['./powermate']
+ obj.export_incdirs = ['.']
obj.cxxflags = '-DPACKAGE="ardour_powermate"'
- obj.includes = ['.', './powermate']
+ obj.includes = ['.' ]
obj.name = 'libpowermate'
obj.target = 'powermate'
- obj.uselib_local = 'libardour libsurfaces'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.uselib_local = 'libardour libardour_cp'
+ obj.vnum = LIBARDOUR_POWERMATE_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():
diff --git a/libs/surfaces/tranzport/wscript b/libs/surfaces/tranzport/wscript
index dec4b9c1d3..a5181566c2 100644
--- a/libs/surfaces/tranzport/wscript
+++ b/libs/surfaces/tranzport/wscript
@@ -6,7 +6,7 @@ import os
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
+LIBARDOUR_TRANZPORT_LIB_VERSION = '4.1.0'
# Mandatory variables
srcdir = '.'
@@ -41,10 +41,10 @@ def build(bld):
obj.export_incdirs = ['./tranzport']
obj.cxxflags = '-DPACKAGE="ardour_tranzport"'
obj.includes = ['.', './tranzport']
- obj.name = 'libtranzport'
- obj.target = 'tranzport'
- obj.uselib_local = 'libardour libsurfaces'
- obj.vnum = LIBSURFACES_LIB_VERSION
+ obj.name = 'libardour_tranzport'
+ obj.target = 'ardour_tranzport'
+ obj.uselib_local = 'libardour libardour_cp'
+ obj.vnum = LIBARDOUR_TRANZPORT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
def shutdown():
diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript
index bd37af7426..d629e6ab8e 100644
--- a/libs/surfaces/wscript
+++ b/libs/surfaces/wscript
@@ -1,5 +1,6 @@
#!/usr/bin/env python
import autowaf
+import Options
# Version of this package (even if built as a child)
LIBSURFACES_VERSION = '4.1.0'
@@ -24,9 +25,32 @@ def set_options(opt):
def configure(conf):
autowaf.configure(conf)
+ conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
+ conf.check_cc (header_name='linux/input.h', define_name='BUILD_POWERMATE')
+ conf.check_cc (lib='lo', header_name='lo/lo.h', function_name='lo_server_new', define_name='BUILD_OSC')
+
+ if Options.options.wiimote:
+ conf.check_cc (header_name='cwiid.h',define_name='HAVE_CWIID_H')
+ if not conf.env['HAVE_CWIID_H']:
+ print 'WIIMOTE configured but you are missing libcwiid!'
+ sys.exit(1)
+ conf.check_cc (header_name='bluetooth/bluetooth.h',define_name='HAVE_BLUETOOTH_H')
+ if not conf.env['HAVE_BLUETOOTH_H']:
+ print 'WIIMOTE configured but you are missing the libbluetooth headers needed to compile wiimote support!'
+ sys.exit(1)
+ conf.define ('BUILD_WIIMOTE', 1)
+
def build(bld):
bld.add_subdirs('control_protocol')
bld.add_subdirs('generic_midi')
+ if bld.env['BUILD_OSC']:
+ bld.add_subdirs('osc')
+ if bld.env['BUILD_POWERMATE']:
+ bld.add_subdirs('powermate')
+ if bld.env['BUILD_WIIMOTE']:
+ bld.add_subdirs('wiimote')
+ if bld.env['BUILD_TRANZPORT']:
+ bld.add_subdirs('tranzport')
def shutdown():
autowaf.shutdown()