diff options
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol/control_protocol.h | 9 | ||||
-rw-r--r-- | libs/surfaces/control_protocol/wscript | 3 | ||||
-rw-r--r-- | libs/surfaces/frontier/kernel_drivers/tranzport.c | 2 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/generic_midi_control_protocol.cc | 8 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/interface.cc | 33 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/midicontrollable.cc | 12 | ||||
-rw-r--r-- | libs/surfaces/generic_midi/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/mackie/device_info.cc | 13 | ||||
-rw-r--r-- | libs/surfaces/mackie/device_profile.cc | 8 | ||||
-rw-r--r-- | libs/surfaces/mackie/interface.cc | 34 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 3 | ||||
-rw-r--r-- | libs/surfaces/mackie/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/osc/interface.cc | 13 | ||||
-rw-r--r-- | libs/surfaces/osc/osc.cc | 7 | ||||
-rw-r--r-- | libs/surfaces/osc/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/tranzport/interface.cc | 14 | ||||
-rw-r--r-- | libs/surfaces/tranzport/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/wiimote/interface.cc | 16 | ||||
-rw-r--r-- | libs/surfaces/wiimote/wscript | 1 | ||||
-rw-r--r-- | libs/surfaces/wscript | 22 |
20 files changed, 98 insertions, 104 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol/control_protocol.h b/libs/surfaces/control_protocol/control_protocol/control_protocol.h index 55ea459cae..05315fc40a 100644 --- a/libs/surfaces/control_protocol/control_protocol/control_protocol.h +++ b/libs/surfaces/control_protocol/control_protocol/control_protocol.h @@ -34,6 +34,13 @@ #include "control_protocol/basic_ui.h" #include "control_protocol/types.h" +#ifdef ARDOURSURFACE_DLL_EXPORTS // defined if we are building the ARDOUR surface DLLs (instead of using them) + #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_EXPORT +#else + #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_IMPORT +#endif +#define ARDOURSURFACE_LOCAL LIBARDOUR_HELPER_DLL_LOCAL + namespace ARDOUR { class Route; @@ -143,7 +150,7 @@ class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::Scope void prev_track (uint32_t initial_id); private: - ControlProtocol (const ControlProtocol&); /* noncopyable */ + ARDOURSURFACE_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */ }; extern "C" { diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index e1e1af950c..10ec7f6c95 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -41,9 +41,10 @@ def build(bld): obj.export_includes = ['.', './control_protocol' ] obj.defines += [ 'PACKAGE="ardour_cp"' ] obj.includes = ['.', './control_protocol'] + obj.defines = [ 'ARDOURCP_DLL_EXPORTS' ] obj.name = 'libardour_cp' obj.target = 'ardourcp' - obj.use = 'ardour libtimecode' + obj.use = 'libardour libtimecode' obj.vnum = LIBARDOUR_CP_LIB_VERSION obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') diff --git a/libs/surfaces/frontier/kernel_drivers/tranzport.c b/libs/surfaces/frontier/kernel_drivers/tranzport.c index 6893f66921..b7b6709d56 100644 --- a/libs/surfaces/frontier/kernel_drivers/tranzport.c +++ b/libs/surfaces/frontier/kernel_drivers/tranzport.c @@ -445,7 +445,7 @@ static void usb_tranzport_interrupt_out_callback(struct urb *urb) { struct usb_tranzport *dev = urb->context; - /* sync/async unlink faults aren't errors */ + /* sync/async ::g_unlink faults aren't errors */ if (urb->status && !(urb->status == -ENOENT || urb->status == -ECONNRESET || urb->status == -ESHUTDOWN)) diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index ba1858a174..e0b06a9369 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -107,7 +107,7 @@ static const char * const midimap_env_variable_name = "ARDOUR_MIDIMAPS_PATH"; static const char* const midi_map_dir_name = "midi_maps"; static const char* const midi_map_suffix = ".map"; -SearchPath +Searchpath system_midi_map_search_path () { bool midimap_path_defined = false; @@ -117,7 +117,7 @@ system_midi_map_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(midi_map_dir_name); return spath; } @@ -129,7 +129,7 @@ user_midi_map_directory () } static bool -midi_map_filter (const string &str, void */*arg*/) +midi_map_filter (const string &str, void* /*arg*/) { return (str.length() > strlen(midi_map_suffix) && str.find (midi_map_suffix) == (str.length() - strlen (midi_map_suffix))); @@ -140,7 +140,7 @@ GenericMidiControlProtocol::reload_maps () { vector<string *> *midi_maps; PathScanner scanner; - SearchPath spath (system_midi_map_search_path()); + Searchpath spath (system_midi_map_search_path()); spath += user_midi_map_directory (); midi_maps = scanner (spath.to_string(), midi_map_filter, 0, false, true); diff --git a/libs/surfaces/generic_midi/interface.cc b/libs/surfaces/generic_midi/interface.cc index 94edb0ba80..1f2ae7b127 100644 --- a/libs/surfaces/generic_midi/interface.cc +++ b/libs/surfaces/generic_midi/interface.cc @@ -24,7 +24,7 @@ using namespace ARDOUR; -ControlProtocol* +ControlProtocol* ARDOURSURFACE_LOCAL new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) { GenericMidiControlProtocol* gmcp; @@ -43,35 +43,30 @@ new_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s return gmcp; } -void +void ARDOURSURFACE_LOCAL delete_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +bool ARDOURSURFACE_LOCAL probe_generic_midi_protocol (ControlProtocolDescriptor* /*descriptor*/) { return GenericMidiControlProtocol::probe (); } +// Field names commented out by JE - 06-01-2010 static ControlProtocolDescriptor generic_midi_descriptor = { - name : "Generic MIDI", - id : "uri://ardour.org/surfaces/generic_midi:0", - ptr : 0, - module : 0, - mandatory : 0, - supports_feedback : true, - probe : probe_generic_midi_protocol, - initialize : new_generic_midi_protocol, - destroy : delete_generic_midi_protocol + /*name : */ "Generic MIDI", + /*id : */ "uri://ardour.org/surfaces/generic_midi:0", + /*ptr : */ 0, + /*module : */ 0, + /*mandatory : */ 0, + /*supports_feedback : */ true, + /*probe : */ probe_generic_midi_protocol, + /*initialize : */ new_generic_midi_protocol, + /*destroy : */ delete_generic_midi_protocol }; - -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &generic_midi_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; } diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index d78dd5e644..a26617fd67 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -27,6 +27,8 @@ #include "pbd/xml++.h" #include "pbd/stacktrace.h" +#include "midi++/types.h" // Added by JE - 06-01-2009. All instances of 'byte' changed to 'MIDI::byte' (for clarification) +#include "midi++/port.h" #include "midi++/channel.h" #include "ardour/async_midi_port.h" @@ -55,7 +57,7 @@ MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser& last_controllable_value = 0.0f; control_type = none; _control_description = "MIDI Control: none"; - control_additional = (byte) -1; + control_additional = (MIDI::byte) -1; feedback = true; // for now } @@ -73,7 +75,7 @@ MIDIControllable::MIDIControllable (GenericMidiControlProtocol* s, MIDI::Parser& last_controllable_value = 0.0f; control_type = none; _control_description = "MIDI Control: none"; - control_additional = (byte) -1; + control_additional = (MIDI::byte) -1; feedback = true; // for now } @@ -108,7 +110,7 @@ MIDIControllable::drop_external_control () { midi_forget (); control_type = none; - control_additional = (byte) -1; + control_additional = (MIDI::byte) -1; } void @@ -313,7 +315,7 @@ MIDIControllable::midi_sense_controller (Parser &, EventTwoBytes *msg) } void -MIDIControllable::midi_sense_program_change (Parser &, byte msg) +MIDIControllable::midi_sense_program_change (Parser &, MIDI::byte msg) { if (!controllable) { if (lookup_controllable ()) { @@ -349,7 +351,7 @@ MIDIControllable::midi_sense_pitchbend (Parser &, pitchbend_t pb) } void -MIDIControllable::midi_receiver (Parser &, byte *msg, size_t /*len*/) +MIDIControllable::midi_receiver (Parser &, MIDI::byte *msg, size_t /*len*/) { /* we only respond to channel messages */ diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index cdc68529ac..f3868fadfc 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -36,6 +36,7 @@ def build(bld): obj.includes = ['.', './generic_midi'] obj.name = 'libardour_generic_midi' obj.target = 'ardour_generic_midi' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.uselib = 'GTKMM GTK GDK' obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index 45fd2faebd..04cbfecc56 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -24,6 +24,7 @@ #include "pbd/xml++.h" #include "pbd/error.h" #include "pbd/pathscanner.h" +#include "pbd/convert.h" #include "ardour/filesystem_paths.h" @@ -221,7 +222,7 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) /* strip count is mandatory */ if ((child = node.child ("Strips")) != 0) { if ((prop = child->property ("value")) != 0) { - if ((_strip_cnt = atoi (prop->value())) == 0) { + if ((_strip_cnt = atoi (prop->value().c_str())) == 0) { _strip_cnt = 8; } } @@ -231,7 +232,7 @@ DeviceInfo::set_state (const XMLNode& node, int /* version */) if ((child = node.child ("Extenders")) != 0) { if ((prop = child->property ("value")) != 0) { - if ((_extenders = atoi (prop->value())) == 0) { + if ((_extenders = atoi (prop->value().c_str())) == 0) { _extenders = 0; } } @@ -441,7 +442,7 @@ static const char * const devinfo_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devinfo_dir_name = "mcp"; static const char* const devinfo_suffix = ".device"; -static SearchPath +static Searchpath devinfo_search_path () { bool devinfo_path_defined = false; @@ -451,14 +452,14 @@ devinfo_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devinfo_dir_name); return spath; } static bool -devinfo_filter (const string &str, void */*arg*/) +devinfo_filter (const string &str, void* /*arg*/) { return (str.length() > strlen(devinfo_suffix) && str.find (devinfo_suffix) == (str.length() - strlen (devinfo_suffix))); @@ -471,7 +472,7 @@ DeviceInfo::reload_device_info () vector<string> s; vector<string *> *devinfos; PathScanner scanner; - SearchPath spath (devinfo_search_path()); + Searchpath spath (devinfo_search_path()); devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true); device_info.clear (); diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index ea57458e1c..ddbb4782db 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -55,7 +55,7 @@ static const char * const devprofile_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devprofile_dir_name = "mcp"; static const char* const devprofile_suffix = ".profile"; -static SearchPath +static Searchpath devprofile_search_path () { bool devprofile_path_defined = false; @@ -65,7 +65,7 @@ devprofile_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devprofile_dir_name); return spath; @@ -78,7 +78,7 @@ user_devprofile_directory () } static bool -devprofile_filter (const string &str, void */*arg*/) +devprofile_filter (const string &str, void* /*arg*/) { return (str.length() > strlen(devprofile_suffix) && str.find (devprofile_suffix) == (str.length() - strlen (devprofile_suffix))); @@ -91,7 +91,7 @@ DeviceProfile::reload_device_profiles () vector<string> s; vector<string *> *devprofiles; PathScanner scanner; - SearchPath spath (devprofile_search_path()); + Searchpath spath (devprofile_search_path()); devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true); device_profiles.clear (); diff --git a/libs/surfaces/mackie/interface.cc b/libs/surfaces/mackie/interface.cc index 294a222a6b..abef84817d 100644 --- a/libs/surfaces/mackie/interface.cc +++ b/libs/surfaces/mackie/interface.cc @@ -29,7 +29,7 @@ using namespace ARDOUR; using namespace PBD; using namespace std; -ControlProtocol* +static ControlProtocol* new_mackie_protocol (ControlProtocolDescriptor*, Session* s) { MackieControlProtocol* mcp = 0; @@ -47,7 +47,7 @@ new_mackie_protocol (ControlProtocolDescriptor*, Session* s) return mcp; } -void +static void delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) { try @@ -66,34 +66,28 @@ delete_mackie_protocol (ControlProtocolDescriptor*, ControlProtocol* cp) So anything that can be changed in the UI should not be used here to prevent loading of the lib. */ -bool +static bool probe_mackie_protocol (ControlProtocolDescriptor*) { return MackieControlProtocol::probe(); } +// Field names commented out by JE - 06-01-2010 static ControlProtocolDescriptor mackie_descriptor = { - name : "Mackie", - id : "uri://ardour.org/surfaces/mackie:0", - ptr : 0, - module : 0, - mandatory : 0, + /*name : */ "Mackie", + /*id : */ "uri://ardour.org/surfaces/mackie:0", + /*ptr : */ 0, + /*module : */ 0, + /*mandatory : */ 0, // actually, the surface does support feedback, but all this // flag does is show a submenu on the UI, which is useless for the mackie // because feedback is always on. In any case, who'd want to use the // mcu without the motorised sliders doing their thing? - supports_feedback : false, - probe : probe_mackie_protocol, - initialize : new_mackie_protocol, - destroy : delete_mackie_protocol + /*supports_feedback : */ false, + /*probe : */ probe_mackie_protocol, + /*initialize : */ new_mackie_protocol, + /*destroy : */ delete_mackie_protocol }; -extern "C" { - -ControlProtocolDescriptor* -protocol_descriptor () { - return &mackie_descriptor; -} - -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; } diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index b55ac74c35..5b772d9af5 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -29,7 +29,6 @@ #include <float.h> #include <sys/time.h> #include <errno.h> -#include <poll.h> #include <boost/shared_array.hpp> @@ -1245,7 +1244,9 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port) */ if (!_device_info.uses_ipmidi()) { +#ifndef PLATFORM_WINDOWS CrossThreadChannel::drain (port->selectable()); +#endif } DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name())); diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index d76a26f651..a7177bf0a6 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -48,6 +48,7 @@ def build(bld): # need ../libs because some GTK2 header files require stuff there obj.includes = ['.', '../libs'] obj.name = 'libardour_mcp' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_mcp' obj.uselib = 'GTKMM' obj.use = 'libardour libardour_cp libgtkmm2ext' diff --git a/libs/surfaces/osc/interface.cc b/libs/surfaces/osc/interface.cc index a414d4eb82..f20d898418 100644 --- a/libs/surfaces/osc/interface.cc +++ b/libs/surfaces/osc/interface.cc @@ -23,7 +23,7 @@ using namespace ARDOUR; -ControlProtocol* +static ControlProtocol* new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) { OSC* osc = new OSC (*s, Config->get_osc_port()); @@ -33,13 +33,13 @@ new_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, Session* s) return osc; } -void +static void delete_osc_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +static bool probe_osc_protocol (ControlProtocolDescriptor* /*descriptor*/) { return true; // we can always do OSC @@ -57,10 +57,5 @@ static ControlProtocolDescriptor osc_descriptor = { destroy : delete_osc_protocol }; -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &osc_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; } diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc index 0c7c8455a4..8b57dc0c3e 100644 --- a/libs/surfaces/osc/osc.cc +++ b/libs/surfaces/osc/osc.cc @@ -28,6 +28,7 @@ #include <unistd.h> #include <fcntl.h> +#include <glib/gstdio.h> #include <glibmm/miscutils.h> #include <pbd/pthread_utils.h> @@ -181,7 +182,7 @@ OSC::start () int fd = mkstemp(tmpstr); if (fd >= 0 ) { - unlink (tmpstr); + ::g_unlink (tmpstr); close (fd); _osc_unix_server = lo_server_new (tmpstr, error_callback); @@ -284,11 +285,11 @@ OSC::stop () } if (!_osc_unix_socket_path.empty()) { - unlink (_osc_unix_socket_path.c_str()); + ::g_unlink (_osc_unix_socket_path.c_str()); } if (!_osc_url_file.empty() ) { - unlink (_osc_url_file.c_str() ); + ::g_unlink (_osc_url_file.c_str() ); } // Delete any active route observers diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index 88174c0faf..102b7426bd 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -32,6 +32,7 @@ def build(bld): obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', './osc'] obj.name = 'libardour_osc' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_osc' obj.uselib = ' LO ' obj.use = 'libardour libardour_cp libpbd' diff --git a/libs/surfaces/tranzport/interface.cc b/libs/surfaces/tranzport/interface.cc index 16ff22687a..3cf7090783 100644 --- a/libs/surfaces/tranzport/interface.cc +++ b/libs/surfaces/tranzport/interface.cc @@ -23,7 +23,7 @@ using namespace ARDOUR; -ControlProtocol* +static ControlProtocol* new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) { TranzportControlProtocol* tcp = new TranzportControlProtocol (*s); @@ -37,13 +37,13 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) } -void +static void delete_tranzport_protocol (ControlProtocolDescriptor* descriptor, ControlProtocol* cp) { delete cp; } -bool +static bool probe_tranzport_protocol (ControlProtocolDescriptor* descriptor) { return TranzportControlProtocol::probe(); @@ -62,10 +62,6 @@ static ControlProtocolDescriptor tranzport_descriptor = { }; -extern "C" { -ControlProtocolDescriptor* -protocol_descriptor () { - return &tranzport_descriptor; -} -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &tranzport_descriptor; } + diff --git a/libs/surfaces/tranzport/wscript b/libs/surfaces/tranzport/wscript index 7d80295fba..a73cec2832 100644 --- a/libs/surfaces/tranzport/wscript +++ b/libs/surfaces/tranzport/wscript @@ -44,6 +44,7 @@ def build(bld): obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1' ] obj.includes = ['.', './tranzport'] obj.name = 'libardour_tranzport' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_tranzport' obj.use = 'libardour libardour_cp' obj.vnum = LIBARDOUR_TRANZPORT_LIB_VERSION diff --git a/libs/surfaces/wiimote/interface.cc b/libs/surfaces/wiimote/interface.cc index 318bc40adf..9a704e445e 100644 --- a/libs/surfaces/wiimote/interface.cc +++ b/libs/surfaces/wiimote/interface.cc @@ -29,7 +29,7 @@ using namespace ARDOUR; using namespace PBD; -ControlProtocol* +static ControlProtocol* new_wiimote_protocol (ControlProtocolDescriptor*, Session* s) { WiimoteControlProtocol* wmcp = new WiimoteControlProtocol (*s); @@ -37,13 +37,13 @@ new_wiimote_protocol (ControlProtocolDescriptor*, Session* s) return wmcp; } -void +static void delete_wiimote_protocol (ControlProtocolDescriptor* /*descriptor*/, ControlProtocol* cp) { delete cp; } -bool +static bool probe_wiimote_protocol (ControlProtocolDescriptor*) { return WiimoteControlProtocol::probe (); @@ -61,13 +61,5 @@ static ControlProtocolDescriptor wiimote_descriptor = { destroy : delete_wiimote_protocol }; - -extern "C" { - -ControlProtocolDescriptor* -protocol_descriptor () { - return &wiimote_descriptor; -} - -} +extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; } diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript index 623aa960db..4dca1fcdb0 100644 --- a/libs/surfaces/wiimote/wscript +++ b/libs/surfaces/wiimote/wscript @@ -30,6 +30,7 @@ def build(bld): obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', '../libs'] obj.name = 'libardour_wiimote' + obj.defines = [ 'ARDOURSURFACE_DLL_EXPORTS' ] obj.target = 'ardour_wiimote' obj.uselib = 'GTKMM CWIID' obj.use = 'libardour libardour_cp libgtkmm2ext' diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript index d9009bee25..29edc427b2 100644 --- a/libs/surfaces/wscript +++ b/libs/surfaces/wscript @@ -23,10 +23,6 @@ children = [ 'control_protocol', 'frontier', 'generic_midi', - 'mackie', - 'osc', - 'tranzport', - 'wiimote' ] def options(opt): @@ -39,16 +35,22 @@ def sub_config_and_use(conf, name, has_objects = True): def configure(conf): autowaf.set_recursive() autowaf.configure(conf) - + for i in children: sub_config_and_use(conf, i) + if (conf.env['build_target'] == 'mingw'): return + #autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False) #if Options.options.tranzport and conf.is_defined('HAVE_USB'): # conf.define('BUILD_TRANZPORT', 1) - autowaf.check_pkg (conf, 'liblo', mandatory=False, uselib_store="LO", atleast_version="0.24") - + if conf.check_cc (header_name='poll.h', define_name='BUILD_MACKIE', mandatory=False): + sub_config_and_use(conf, 'mackie') + + if autowaf.check_pkg (conf, 'liblo', mandatory=False, uselib_store="LO", atleast_version="0.24"): + sub_config_and_use(conf, 'osc') + conf.check_cc (header_name='cwiid.h', define_name='HAVE_CWIID_H',mandatory=False) if conf.is_defined('HAVE_CWIID_H'): conf.check_cc (header_name='bluetooth/bluetooth.h', define_name='HAVE_BLUETOOTH_H',mandatory=False) @@ -56,6 +58,7 @@ def configure(conf): autowaf.check_pkg(conf, 'cwiid', uselib_store='CWIID', atleast_version='0.6.00',mandatory=False) if conf.is_defined ('HAVE_CWIID'): conf.define ('BUILD_WIIMOTE', 1) + sub_config_and_use(conf, 'wiimote') else: print('You have the cwiid headers needed to compile wiimote support BUT you are missing the pkg-config file for cwiid') else: @@ -65,8 +68,9 @@ def configure(conf): def build(bld): bld.recurse('control_protocol') - bld.recurse('generic_midi') - bld.recurse('mackie') + if (bld.env['build_target'] == 'mingw'): return + if bld.is_defined ('BUILD_MACKIE'): + bld.recurse('mackie') if bld.is_defined ('HAVE_LO'): bld.recurse('osc') if bld.is_defined('BUILD_WIIMOTE'): |