initial, prototype modifications to permit compilation of local libraries as static libs. required a "fix" to libs/pbd/debug.cc to even get the program up and running, and still does not work due to issues with boost::shared_ptr::enable_shared_from_this. controlled by configure-time --internal-{static,shared}-libs, set to shared by default (as has been the case for years)

This commit is contained in:
Paul Davis 2013-03-20 17:18:55 -04:00
parent 4caecfa310
commit 16ce39c230
6 changed files with 104 additions and 76 deletions

View file

@ -370,11 +370,16 @@ int main(int argc, char** argv) {
def build(bld): def build(bld):
# Library # Library
obj = bld(features = 'c cxx cshlib cxxshlib') if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj.source = libardour_sources obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources)
else:
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
obj.cxxflags = [ '-fPIC' ]
obj.cflags = [ '-fPIC' ]
obj.export_includes = ['.'] obj.export_includes = ['.']
obj.includes = ['.', '../surfaces/control_protocol', '..'] obj.includes = ['.', '../surfaces/control_protocol', '..']
obj.name = 'libardour' obj.name = 'ardour'
obj.target = 'ardour' obj.target = 'ardour'
obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID', obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS', 'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS',

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from waflib.extras import autowaf as autowaf from waflib.extras import autowaf as autowaf
from waflib import Options
import os import os
# Version of this package (even if built as a child) # Version of this package (even if built as a child)
@ -82,14 +83,18 @@ def configure(conf):
def build(bld): def build(bld):
obj = bld(features = 'c cxx cxxshlib cshlib') if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj.source = gtkmm2ext_sources obj = bld.shlib(features = 'c cxx cshlib cxxshlib', source=gtkmm2ext_sources)
else:
obj = bld.stlib(features = 'c cxx cstlib cxxstlib', source=gtkmm2ext_sources)
obj.cxxflags = [ '-fPIC' ]
obj.export_includes = ['.'] obj.export_includes = ['.']
obj.includes = ['.'] obj.includes = ['.']
obj.name = 'libgtkmm2ext' obj.name = 'libgtkmm2ext'
obj.target = 'gtkmm2ext' obj.target = 'gtkmm2ext'
obj.uselib = 'GTKMM GTK GTKOSX OSX GDK' obj.uselib = 'GTKMM GTK GTKOSX OSX GDK'
obj.use = 'libpbd' obj.use = [ 'libpbd' ]
obj.vnum = GTKMM2EXT_LIB_VERSION obj.vnum = GTKMM2EXT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.defines = [ obj.defines = [

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from waflib.extras import autowaf as autowaf from waflib.extras import autowaf as autowaf
from waflib import Options
import os import os
import sys import sys
@ -25,6 +26,20 @@ out = 'build'
path_prefix = 'libs/midi++2/' path_prefix = 'libs/midi++2/'
libmidi_sources = [
'midi.cc',
'channel.cc',
'ipmidi_port.cc',
'jack_midi_port.cc',
'manager.cc',
'parser.cc',
'port.cc',
'midnam_patch.cc',
'mmc.cc',
'mtc.cc',
'version.cc',
]
def options(opt): def options(opt):
autowaf.set_options(opt) autowaf.set_options(opt)
opt.add_option('--test', action='store_true', default=False, dest='build_tests', opt.add_option('--test', action='store_true', default=False, dest='build_tests',
@ -46,22 +61,12 @@ def configure(conf):
def build(bld): def build(bld):
# Library # Library
obj = bld(features = 'cxx cxxshlib') if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj.source = ''' obj = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources)
midi.cc else:
channel.cc obj = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
ipmidi_port.cc obj.cxxflags = [ '-fPIC', '-DWITH_JACK_MIDI' ]
jack_midi_port.cc
manager.cc
parser.cc
port.cc
midnam_patch.cc
mmc.cc
mtc.cc
version.cc
'''
# everybody loves JACK # everybody loves JACK
obj.cxxflags = [ '-DWITH_JACK_MIDI' ]
obj.export_includes = ['.'] obj.export_includes = ['.']
obj.includes = ['.', '../surfaces/control_protocol'] obj.includes = ['.', '../surfaces/control_protocol']
obj.name = 'libmidipp' obj.name = 'libmidipp'

View file

@ -30,7 +30,12 @@
using namespace std; using namespace std;
static uint64_t _debug_bit = 1; static uint64_t _debug_bit = 1;
static std::map<const char*,uint64_t> _debug_bit_map;
typedef std::map<const char*,uint64_t> DebugMap;
namespace PBD {
DebugMap _debug_bit_map;
}
uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful"); uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful");
uint64_t PBD::DEBUG::Properties = PBD::new_debug_bit ("properties"); uint64_t PBD::DEBUG::Properties = PBD::new_debug_bit ("properties");

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
from waflib.extras import autowaf as autowaf from waflib.extras import autowaf as autowaf
from waflib import Options
from waflib import TaskGen from waflib import TaskGen
import os import os
import sys import sys
@ -27,6 +28,58 @@ out = 'build'
path_prefix = 'libs/pbd/' path_prefix = 'libs/pbd/'
libpbd_sources = [
'basename.cc',
'base_ui.cc',
'boost_debug.cc',
'cartesian.cc',
'command.cc',
'convert.cc',
'controllable.cc',
'controllable_descriptor.cc',
'clear_dir.cc',
'crossthread.cc',
'cpus.cc',
'debug.cc',
'enumwriter.cc',
'event_loop.cc',
'dmalloc.cc',
'enums.cc',
'epa.cc',
'error.cc',
'file_manager.cc',
'file_utils.cc',
'fpu.cc',
'id.cc',
'locale_guard.cc',
'malign.cc',
'mountpoint.cc',
'openuri.cc',
'pathexpand.cc',
'pathscanner.cc',
'pool.cc',
'property_list.cc',
'pthread_utils.cc',
'receiver.cc',
'search_path.cc',
'semutils.cc',
'shortpath.cc',
'signals.cc',
'sndfile_manager.cc',
'stacktrace.cc',
'stateful_diff_command.cc',
'stateful.cc',
'strreplace.cc',
'strsplit.cc',
'textreceiver.cc',
'transmitter.cc',
'undo.cc',
'uuid.cc',
'version.cc',
'whitespace.cc',
'xml++.cc',
]
def options(opt): def options(opt):
autowaf.set_options(opt) autowaf.set_options(opt)
@ -58,58 +111,13 @@ def build(bld):
bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h') bld(rule = 'python ${SRC} ${TGT}', source = 'pbd/signals.py', target = 'pbd/signals_generated.h')
# Library # Library
obj = bld(features = 'cxx cxxshlib') if bld.is_defined ('INTERNAL_SHARED_LIBS'):
obj.source = ''' print 'BUILD SHARED LIB'
basename.cc obj = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources)
base_ui.cc else:
boost_debug.cc print 'BUILD STATIC LIB'
cartesian.cc obj = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
command.cc obj.cxxflags = [ '-fPIC' ]
convert.cc
controllable.cc
controllable_descriptor.cc
clear_dir.cc
crossthread.cc
cpus.cc
debug.cc
enumwriter.cc
event_loop.cc
dmalloc.cc
enums.cc
epa.cc
error.cc
file_manager.cc
file_utils.cc
fpu.cc
id.cc
locale_guard.cc
malign.cc
mountpoint.cc
openuri.cc
pathexpand.cc
pathscanner.cc
pool.cc
property_list.cc
pthread_utils.cc
receiver.cc
search_path.cc
semutils.cc
shortpath.cc
signals.cc
sndfile_manager.cc
stacktrace.cc
stateful_diff_command.cc
stateful.cc
strreplace.cc
strsplit.cc
textreceiver.cc
transmitter.cc
undo.cc
uuid.cc
version.cc
whitespace.cc
xml++.cc
'''
if bld.is_defined('DEBUG_RT_ALLOC'): if bld.is_defined('DEBUG_RT_ALLOC'):
obj.source += 'debug_rt_alloc.c' obj.source += 'debug_rt_alloc.c'

View file

@ -26,11 +26,11 @@ def build(bld):
control_protocol.cc control_protocol.cc
''' '''
obj.export_includes = ['.', './control_protocol' ] obj.export_includes = ['.', './control_protocol' ]
obj.cxxflags = '-DPACKAGE="ardour_cp"' obj.cxxflags = '-DPACKAGE="ardour_cp" -fPIC'
obj.includes = ['.', './control_protocol'] obj.includes = ['.', './control_protocol']
obj.name = 'libardour_cp' obj.name = 'libardour_cp'
obj.target = 'ardourcp' obj.target = 'ardourcp'
obj.use = 'libardour libtimecode' obj.use = 'ardour libtimecode'
obj.vnum = LIBARDOUR_CP_LIB_VERSION obj.vnum = LIBARDOUR_CP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')