From 61c1956ef994483d92828169b7b032d5520d2256 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 17 Oct 2013 15:02:20 -0400 Subject: [PATCH] add -fvisibility=hidden to evoral, and make things work --- libs/backends/jack/wscript | 2 ++ libs/evoral/evoral/visibility.h | 6 +++--- libs/evoral/wscript | 6 +++++- libs/midi++2/wscript | 2 +- libs/panners/1in2out/wscript | 2 +- libs/panners/2in2out/wscript | 2 +- libs/panners/vbap/wscript | 2 +- libs/surfaces/control_protocol/wscript | 2 +- libs/surfaces/generic_midi/wscript | 2 +- libs/surfaces/mackie/wscript | 2 +- libs/surfaces/osc/wscript | 2 +- libs/surfaces/wiimote/wscript | 2 +- 12 files changed, 19 insertions(+), 13 deletions(-) diff --git a/libs/backends/jack/wscript b/libs/backends/jack/wscript index d76ec095ca..1e913bb18c 100644 --- a/libs/backends/jack/wscript +++ b/libs/backends/jack/wscript @@ -42,6 +42,8 @@ def build(bld): obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', 'ARDOURBACKEND_DLL_EXPORTS' ] + if bld.is_defined ('INTERNAL_SHARED_LIBS'): + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] # # device discovery code in the jack backend needs ALSA diff --git a/libs/evoral/evoral/visibility.h b/libs/evoral/evoral/visibility.h index 6b30bd1c9f..380caca2fd 100644 --- a/libs/evoral/evoral/visibility.h +++ b/libs/evoral/evoral/visibility.h @@ -17,8 +17,8 @@ */ -#ifndef __libevoral_libevoral_visibility_h__ -#define __libevoral_libevoral_visibility_h__ +#ifndef __libevoral_visibility_h__ +#define __libevoral_visibility_h__ /* _WIN32 is defined by most compilers targetting Windows, but within the * evoral source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending @@ -53,4 +53,4 @@ #define LIBEVORAL_LOCAL #endif -#endif /* __libevoral_libevoral_visibility_h__ */ +#endif /* __libevoral_visibility_h__ */ diff --git a/libs/evoral/wscript b/libs/evoral/wscript index f309bc7031..569aa0fc6b 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -90,8 +90,12 @@ def build(bld): # Library if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=lib_source) + # DLL exports for this library obj.defines = [ 'LIBEVORAL_DLL=1', 'LIBEVORAL_DLL_EXPORTS=1' ] - obj.defines = [ 'LIBPBD_DLL=1' ] + # DLL imports for other libraries + obj.defines += [ 'LIBPBD_DLL=1' ] + obj.cxxflags = [ '-fvisibility=hidden' ] + obj.cflags = [ '-fvisibility=hidden' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=lib_source) obj.cxxflags = [ '-fPIC' ] diff --git a/libs/midi++2/wscript b/libs/midi++2/wscript index bc3f3313a2..c950d13192 100644 --- a/libs/midi++2/wscript +++ b/libs/midi++2/wscript @@ -63,7 +63,7 @@ def build(bld): if bld.is_defined ('INTERNAL_SHARED_LIBS'): obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources) obj.defines = [ 'LIBMIDIPP_DLL=1', 'LIBMIDIPP_DLL_EXPORTS=1' ] - obj.defines += [ 'LIBPBD_DLL=1' ] + obj.defines += [ 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] else: obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources) obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ] diff --git a/libs/panners/1in2out/wscript b/libs/panners/1in2out/wscript index c26cc0546d..ad9c5a6b4c 100644 --- a/libs/panners/1in2out/wscript +++ b/libs/panners/1in2out/wscript @@ -24,7 +24,7 @@ def build(bld): obj.export_includes = ['.'] obj.defines = [ 'PACKAGE="libardour_pan1in2out"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.'] obj.name = 'libardour_pan1in2out' obj.target = 'pan1in2out' diff --git a/libs/panners/2in2out/wscript b/libs/panners/2in2out/wscript index 72eeda917f..2d83205262 100644 --- a/libs/panners/2in2out/wscript +++ b/libs/panners/2in2out/wscript @@ -24,7 +24,7 @@ def build(bld): obj.export_includes = ['.'] obj.defines = [ 'PACKAGE="libardour_pan2in2out"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.'] obj.name = 'libardour_pan2in2out' obj.target = 'pan2in2out' diff --git a/libs/panners/vbap/wscript b/libs/panners/vbap/wscript index 8d4356b828..4113aba53c 100644 --- a/libs/panners/vbap/wscript +++ b/libs/panners/vbap/wscript @@ -24,7 +24,7 @@ def build(bld): obj.export_includes = ['.'] obj.defines = [ 'PACKAGE="libardour_panvbap"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL_=1', 'LIBPBD_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL_=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.'] obj.name = 'libardour_panvbap' obj.target = 'panvbap' diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index eb2db5d269..6cc285454b 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -30,7 +30,7 @@ def build(bld): # defines for this library obj.defines = [ 'LIBCONTROLCP_DLL=1', 'LIBCONTROLCP_DLL_EXPORTS=1' ] # internal shared libs that we use - obj.defines += [ 'LIBPBD_DLL=1', 'LIBARDOUR_DLL=1' ] + obj.defines += [ 'LIBPBD_DLL=1', 'LIBARDOUR_DLL=1', 'LIBEVORAL_DLL=1' ] else: obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources) obj.cxxflags = [ '-fPIC' ] diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index 1cab8fdd2e..cdc68529ac 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -32,7 +32,7 @@ def build(bld): obj.export_includes = ['.'] obj.defines = [ 'PACKAGE="ardour_genericmidi"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', './generic_midi'] obj.name = 'libardour_generic_midi' obj.target = 'ardour_generic_midi' diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index 3989833544..d76a26f651 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -44,7 +44,7 @@ def build(bld): obj.export_includes = ['./mackie'] obj.defines = [ 'PACKAGE="ardour_mackie"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1', 'LIBEVORAL_DLL=1' ] # need ../libs because some GTK2 header files require stuff there obj.includes = ['.', '../libs'] obj.name = 'libardour_mcp' diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript index d52909aa88..88174c0faf 100644 --- a/libs/surfaces/osc/wscript +++ b/libs/surfaces/osc/wscript @@ -29,7 +29,7 @@ def build(bld): obj.export_includes = ['.'] obj.defines = [ 'PACKAGE="ardour_osc"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1' ] + obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBEVORAL_DLL=1' ] obj.includes = ['.', './osc'] obj.name = 'libardour_osc' obj.target = 'ardour_osc' diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript index eb4e2306e8..623aa960db 100644 --- a/libs/surfaces/wiimote/wscript +++ b/libs/surfaces/wiimote/wscript @@ -27,7 +27,7 @@ def build(bld): obj.export_includes = ['./wiimote'] obj.defines = [ 'PACKAGE="ardour_wiimote"' ] if bld.is_defined ('INTERNAL_SHARED_LIBS'): - obj.defines += [ 'LIBARDOUR_DLL=1', 'LIBCONTROLCP_DLL=1', 'LIBPBD_DLL=1', 'LIBGTKMM2EXT_DLL=1' ] + 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.target = 'ardour_wiimote'