try to get export/visibility and build conditionals right for surfaces/, once more
This commit is contained in:
parent
7000afdc66
commit
79b7fb82f3
|
@ -30,16 +30,26 @@
|
|||
#define LIBCONTROLCP_DLL_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#endif
|
||||
|
||||
#ifdef LIBCONTROLCP_STATIC // libcontrolcp is not a DLL
|
||||
#define LIBCONTROLCP_API
|
||||
#define LIBCONTROLCP_LOCAL
|
||||
#else
|
||||
#ifdef LIBCONTROLCP_DLL_EXPORTS // defined if we are building the libcontrolcp DLL (instead of using it)
|
||||
#ifdef LIBCONTROLCP_DLL_EXPORTS // defined if we are building the libcontrolcp DLL (instead of using it)
|
||||
#define LIBCONTROLCP_API LIBCONTROLCP_DLL_EXPORT
|
||||
#else
|
||||
#else
|
||||
#define LIBCONTROLCP_API LIBCONTROLCP_DLL_IMPORT
|
||||
#endif
|
||||
#define LIBCONTROLCP_LOCAL LIBCONTROLCP_DLL_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
#define LIBCONTROLCP_LOCAL LIBCONTROLCP_DLL_LOCAL
|
||||
|
||||
/* These should be used by surfaces/control interfaces. They use (probably)
|
||||
* libcontrolcp but they are not part of it. The idea here is to avoid
|
||||
* having to define per-surface macros for each and every surface. Instead,
|
||||
* every surface defines ARDOURSURFACE_DLL_EXPORTS during building and
|
||||
* uses ARDOURSURFACE_API in its declarations.
|
||||
*/
|
||||
|
||||
#ifdef ARDOURSURFACE_DLL_EXPORTS // defined if we are building the libcontrolcp DLL (instead of using it)
|
||||
#define ARDOURSURFACE_API LIBCONTROLCP_DLL_EXPORT
|
||||
#else
|
||||
#define ARDOURSURFACE_API LIBCONTROLCP_DLL_IMPORT
|
||||
#endif
|
||||
#define ARDOURSURFACE_LOCAL LIBCONTROLCP_DLL_LOCAL
|
||||
|
||||
|
||||
#endif /* __libcontrolcp_visibility_h__ */
|
||||
|
|
|
@ -34,7 +34,8 @@ def build(bld):
|
|||
midicontrollable.cc
|
||||
'''
|
||||
obj.export_includes = ['./generic_midi']
|
||||
obj.defines = [ 'PACKAGE="ardour_frontier"' ]
|
||||
obj.defines = [ 'PACKAGE="ardour_frontier"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.includes = ['.', './generic_midi']
|
||||
obj.name = 'libgeneric_midi'
|
||||
obj.target = 'generic_midi'
|
||||
|
|
|
@ -68,5 +68,5 @@ static ControlProtocolDescriptor generic_midi_descriptor = {
|
|||
/*destroy : */ delete_generic_midi_protocol
|
||||
};
|
||||
|
||||
extern "C" LIBCONTROLCP_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; }
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &generic_midi_descriptor; }
|
||||
|
||||
|
|
|
@ -90,4 +90,4 @@ static ControlProtocolDescriptor mackie_descriptor = {
|
|||
};
|
||||
|
||||
|
||||
extern "C" LIBCONTROLCP_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; }
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &mackie_descriptor; }
|
||||
|
|
|
@ -42,12 +42,10 @@ def build(bld):
|
|||
types.cc
|
||||
'''
|
||||
obj.export_includes = ['./mackie']
|
||||
obj.defines = [ 'PACKAGE="ardour_mackie"' ]
|
||||
# need ../libs because some GTK2 header files require stuff there
|
||||
obj.includes = ['.', '../libs']
|
||||
obj.defines = [ 'PACKAGE="ardour_mackie"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
obj.includes = [ '.' ]
|
||||
obj.name = 'libardour_mcp'
|
||||
obj.defines = [ 'LIBCONTROLCP_EXPORTS' ]
|
||||
obj.defines += [ 'PACKAGE="libardour_mcp"' ]
|
||||
obj.target = 'ardour_mcp'
|
||||
obj.uselib = 'GTKMM'
|
||||
obj.use = 'libardour libardour_cp libgtkmm2ext'
|
||||
|
|
|
@ -57,5 +57,5 @@ static ControlProtocolDescriptor osc_descriptor = {
|
|||
destroy : delete_osc_protocol
|
||||
};
|
||||
|
||||
extern "C" LIBCONTROLCP_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; }
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &osc_descriptor; }
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ def build(bld):
|
|||
wheel_modes.cc
|
||||
'''
|
||||
obj.export_includes = ['./tranzport']
|
||||
obj.defines = [ 'PACKAGE="ardour_tranzport"' ]
|
||||
obj.defines = [ 'PACKAGE="ardour_tranzport"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
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
|
||||
|
|
|
@ -61,5 +61,5 @@ static ControlProtocolDescriptor wiimote_descriptor = {
|
|||
destroy : delete_wiimote_protocol
|
||||
};
|
||||
|
||||
extern "C" LIBCONTROLCP_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; }
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &wiimote_descriptor; }
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ def build(bld):
|
|||
interface.cc
|
||||
'''
|
||||
obj.export_includes = ['./wiimote']
|
||||
obj.defines = [ 'PACKAGE="ardour_wiimote"' ]
|
||||
obj.defines = [ 'PACKAGE="ardour_wiimote"' ]
|
||||
obj.defines += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
|
||||
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'
|
||||
|
|
|
@ -38,15 +38,13 @@ def configure(conf):
|
|||
autowaf.set_recursive()
|
||||
autowaf.configure(conf)
|
||||
|
||||
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)
|
||||
|
||||
if autowaf.check_pkg (conf, 'liblo', mandatory=False, uselib_store="LO", atleast_version="0.24"):
|
||||
children += [ '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)
|
||||
|
@ -67,8 +65,16 @@ def configure(conf):
|
|||
|
||||
|
||||
def build(bld):
|
||||
for i in children:
|
||||
bld.recurse (i)
|
||||
bld.recurse('control_protocol')
|
||||
bld.recurse('generic_midi')
|
||||
bld.recurse('mackie')
|
||||
|
||||
if bld.is_defined ('HAVE_LO'):
|
||||
bld.recurse('osc')
|
||||
if bld.is_defined('BUILD_WIIMOTE'):
|
||||
bld.recurse('wiimote')
|
||||
if bld.is_defined('BUILD_TRANZPORT'):
|
||||
bld.recurse('tranzport')
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
|
Loading…
Reference in New Issue