Waf building of libardour (yay!).
git-svn-id: svn://localhost/ardour2/branches/3.0@4661 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5fe3401814
commit
310d68b953
|
@ -52,6 +52,8 @@ def set_options(opt):
|
|||
help="Header files [Default: PREFIX/include]")
|
||||
opt.add_option('--datadir', type='string',
|
||||
help="Shared data [Default: PREFIX/share]")
|
||||
opt.add_option('--configdir', type='string',
|
||||
help="Configuration data [Default: PREFIX/etc]")
|
||||
opt.add_option('--mandir', type='string',
|
||||
help="Manual pages [Default: DATADIR/man]")
|
||||
opt.add_option('--htmldir', type='string',
|
||||
|
@ -163,6 +165,10 @@ def configure(conf):
|
|||
conf.env['DATADIR'] = Options.options.datadir
|
||||
else:
|
||||
conf.env['DATADIR'] = conf.env['PREFIX'] + '/share/'
|
||||
if Options.options.configdir:
|
||||
conf.env['CONFIGDIR'] = Options.options.configdir
|
||||
else:
|
||||
conf.env['CONFIGDIR'] = conf.env['PREFIX'] + '/etc/'
|
||||
if Options.options.htmldir:
|
||||
conf.env['HTMLDIR'] = Options.options.htmldir
|
||||
else:
|
||||
|
@ -188,6 +194,7 @@ def configure(conf):
|
|||
conf.env['BINDIRNAME'] = chop_prefix(conf, 'BINDIR')
|
||||
conf.env['LIBDIRNAME'] = chop_prefix(conf, 'LIBDIR')
|
||||
conf.env['DATADIRNAME'] = chop_prefix(conf, 'DATADIR')
|
||||
conf.env['CONFIGDIRNAME'] = chop_prefix(conf, 'CONFIGDIR')
|
||||
conf.env['LV2DIRNAME'] = chop_prefix(conf, 'LV2DIR')
|
||||
|
||||
if Options.options.debug:
|
||||
|
|
|
@ -153,7 +153,7 @@ class Route : public IO
|
|||
boost::shared_ptr<Processor> nth_processor (uint32_t n) {
|
||||
Glib::RWLock::ReaderLock lm (_processor_lock);
|
||||
ProcessorList::iterator i;
|
||||
for (i = _processors.begin(); i != _processors.end() && n; ++i, --n);
|
||||
for (i = _processors.begin(); i != _processors.end() && n; ++i, --n) {}
|
||||
if (i == _processors.end()) {
|
||||
return boost::shared_ptr<Processor> ();
|
||||
} else {
|
||||
|
|
|
@ -55,12 +55,6 @@ using namespace PBD;
|
|||
|
||||
gint AudioEngine::m_meter_exit;
|
||||
|
||||
static void
|
||||
ardour_jack_error (const char* msg)
|
||||
{
|
||||
error << "JACK: " << msg << endmsg;
|
||||
}
|
||||
|
||||
AudioEngine::AudioEngine (string client_name)
|
||||
: ports (new Ports)
|
||||
{
|
||||
|
@ -887,7 +881,7 @@ AudioEngine::n_physical_outputs (DataType type) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; ports[i]; ++i);
|
||||
for (i = 0; ports[i]; ++i) {}
|
||||
free (ports);
|
||||
|
||||
return i;
|
||||
|
@ -908,7 +902,7 @@ AudioEngine::n_physical_inputs (DataType type) const
|
|||
}
|
||||
|
||||
if (ports) {
|
||||
for (i = 0; ports[i]; ++i);
|
||||
for (i = 0; ports[i]; ++i) {}
|
||||
free (ports);
|
||||
}
|
||||
return i;
|
||||
|
@ -982,7 +976,7 @@ AudioEngine::get_nth_physical (DataType type, uint32_t n, int flag)
|
|||
return "";
|
||||
}
|
||||
|
||||
for (i = 0; i < n && ports[i]; ++i);
|
||||
for (i = 0; i < n && ports[i]; ++i) {}
|
||||
|
||||
if (ports[i]) {
|
||||
ret = ports[i];
|
||||
|
@ -1116,6 +1110,12 @@ AudioEngine::remove_connections_for (Port& port)
|
|||
|
||||
#ifdef HAVE_JACK_CLIENT_OPEN
|
||||
|
||||
static void
|
||||
ardour_jack_error (const char* msg)
|
||||
{
|
||||
error << "JACK: " << msg << endmsg;
|
||||
}
|
||||
|
||||
int
|
||||
AudioEngine::connect_to_jack (string client_name)
|
||||
{
|
||||
|
|
|
@ -19,12 +19,13 @@
|
|||
|
||||
#include "ardour/port.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/i18n.h"
|
||||
#include "pbd/failed_constructor.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/compose.h"
|
||||
#include <stdexcept>
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
|
|
|
@ -0,0 +1,216 @@
|
|||
#!/usr/bin/env python
|
||||
import autowaf
|
||||
import os
|
||||
|
||||
# Version of this package (even if built as a child)
|
||||
LIBARDOUR_VERSION = '3.0.0'
|
||||
|
||||
# Library version (UNIX style major, minor, micro)
|
||||
# major increment <=> incompatible changes
|
||||
# minor increment <=> compatible changes (additions)
|
||||
# micro increment <=> no interface changes
|
||||
LIBARDOUR_LIB_VERSION = '3.0.0'
|
||||
|
||||
# Variables for 'waf dist'
|
||||
APPNAME = 'libardour'
|
||||
VERSION = LIBARDOUR_VERSION
|
||||
|
||||
# Mandatory variables
|
||||
srcdir = '.'
|
||||
blddir = 'build'
|
||||
|
||||
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.configure(conf)
|
||||
autowaf.check_tool(conf, 'compiler_cxx')
|
||||
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
||||
|
||||
check_header_and_define(conf, 'wordexp.h', 'HAVE_WORDEXP')
|
||||
check_header_and_define(conf, 'sys/vfs.h', 'HAVE_SYS_VFS_H')
|
||||
|
||||
conf.env.append_value('CCFLAGS', '-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE')
|
||||
conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
|
||||
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
||||
conf.write_config_header('wafconfig.h')
|
||||
|
||||
# Boost headers
|
||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
||||
|
||||
def build(bld):
|
||||
# Library
|
||||
obj = bld.new_task_gen('cxx', 'shlib')
|
||||
obj.source = '''
|
||||
amp.cc
|
||||
analyser.cc
|
||||
audio_buffer.cc
|
||||
audio_diskstream.cc
|
||||
audio_library.cc
|
||||
audio_playlist.cc
|
||||
audio_playlist_importer.cc
|
||||
audio_port.cc
|
||||
audio_region_importer.cc
|
||||
audio_track.cc
|
||||
audio_track_importer.cc
|
||||
audioanalyser.cc
|
||||
audioengine.cc
|
||||
audiofile_tagger.cc
|
||||
audiofilesource.cc
|
||||
audioregion.cc
|
||||
audiosource.cc
|
||||
auditioner.cc
|
||||
automatable.cc
|
||||
automation.cc
|
||||
automation_control.cc
|
||||
automation_list.cc
|
||||
beats_frames_converter.cc
|
||||
broadcast_info.cc
|
||||
buffer.cc
|
||||
buffer_set.cc
|
||||
bundle.cc
|
||||
chan_count.cc
|
||||
configuration.cc
|
||||
control_protocol_manager.cc
|
||||
control_protocol_search_path.cc
|
||||
crossfade.cc
|
||||
cycle_timer.cc
|
||||
default_click.cc
|
||||
directory_names.cc
|
||||
diskstream.cc
|
||||
element_import_handler.cc
|
||||
element_importer.cc
|
||||
enums.cc
|
||||
event_type_map.cc
|
||||
export_channel.cc
|
||||
export_channel_configuration.cc
|
||||
export_file_io.cc
|
||||
export_filename.cc
|
||||
export_format_base.cc
|
||||
export_format_manager.cc
|
||||
export_format_specification.cc
|
||||
export_formats.cc
|
||||
export_handler.cc
|
||||
export_preset.cc
|
||||
export_processor.cc
|
||||
export_profile_manager.cc
|
||||
export_status.cc
|
||||
export_timespan.cc
|
||||
export_utilities.cc
|
||||
filename_extensions.cc
|
||||
file_source.cc
|
||||
filesystem_paths.cc
|
||||
filter.cc
|
||||
find_session.cc
|
||||
gain.cc
|
||||
gdither.cc
|
||||
globals.cc
|
||||
import.cc
|
||||
io.cc
|
||||
io_processor.cc
|
||||
jack_slave.cc
|
||||
ladspa_plugin.cc
|
||||
location.cc
|
||||
location_importer.cc
|
||||
meter.cc
|
||||
midi_buffer.cc
|
||||
midi_clock_slave.cc
|
||||
midi_diskstream.cc
|
||||
midi_model.cc
|
||||
midi_patch_manager.cc
|
||||
midi_playlist.cc
|
||||
midi_port.cc
|
||||
midi_region.cc
|
||||
midi_ring_buffer.cc
|
||||
midi_source.cc
|
||||
midi_state_tracker.cc
|
||||
midi_stretch.cc
|
||||
midi_track.cc
|
||||
mix.cc
|
||||
mtc_slave.cc
|
||||
named_selection.cc
|
||||
onset_detector.cc
|
||||
panner.cc
|
||||
pcm_utils.cc
|
||||
playlist.cc
|
||||
playlist_factory.cc
|
||||
plugin.cc
|
||||
plugin_insert.cc
|
||||
plugin_manager.cc
|
||||
port.cc
|
||||
port_insert.cc
|
||||
port_set.cc
|
||||
processor.cc
|
||||
quantize.cc
|
||||
recent_sessions.cc
|
||||
region.cc
|
||||
region_factory.cc
|
||||
resampled_source.cc
|
||||
reverse.cc
|
||||
route.cc
|
||||
route_group.cc
|
||||
send.cc
|
||||
session.cc
|
||||
session_butler.cc
|
||||
session_click.cc
|
||||
session_command.cc
|
||||
session_directory.cc
|
||||
session_events.cc
|
||||
session_export.cc
|
||||
session_metadata.cc
|
||||
session_midi.cc
|
||||
session_process.cc
|
||||
session_state.cc
|
||||
session_state_utils.cc
|
||||
session_time.cc
|
||||
session_transport.cc
|
||||
session_utils.cc
|
||||
smf_source.cc
|
||||
sndfile_helpers.cc
|
||||
sndfileimportable.cc
|
||||
sndfilesource.cc
|
||||
source.cc
|
||||
source_factory.cc
|
||||
svn_revision.cc
|
||||
tape_file_matcher.cc
|
||||
template_utils.cc
|
||||
tempo.cc
|
||||
tempo_map_importer.cc
|
||||
ticker.cc
|
||||
track.cc
|
||||
transient_detector.cc
|
||||
user_bundle.cc
|
||||
utils.cc
|
||||
version.cc
|
||||
'''
|
||||
obj.export_incdirs = ['.']
|
||||
obj.includes = ['.', '../surfaces/control_protocol']
|
||||
obj.name = 'libardour'
|
||||
obj.target = 'ardour'
|
||||
obj.uselib = 'GLIBMM SIGCPP XML UUID'
|
||||
obj.uselib_local = 'libpbd libmidipp libevoral libvamp libtaglib'
|
||||
obj.vnum = LIBARDOUR_LIB_VERSION
|
||||
obj.install_path = ''
|
||||
obj.cxxflags = ' -DPACKAGE=\\\"libardour3\\\"'
|
||||
obj.cxxflags += ' -DDATA_DIR=\\\"' + os.path.normpath(bld.env['DATADIRNAME']) + '\\\"'
|
||||
obj.cxxflags += ' -DCONFIG_DIR=\\\"' + os.path.normpath(bld.env['CONFIGDIRNAME']) + '\\\"'
|
||||
obj.cxxflags += ' -DMODULE_DIR=\\\"' + os.path.normpath(bld.env['LIBDIRNAME']) + '\\\"'
|
||||
obj.cxxflags += ' -DLOCALEDIR=\\\"' + os.path.join(
|
||||
os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
|
||||
obj.cxxflags += ' -DVAMP_DIR=\\\"' + os.path.join(
|
||||
os.path.normpath(bld.env['LIBDIRNAME']), 'ardour3', 'vamp') + '\\\"'
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
|
@ -31,7 +31,9 @@ def configure(conf):
|
|||
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
|
||||
|
||||
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
|
||||
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO')
|
||||
|
||||
# This must be defined for libpbd only, it breaks ardour
|
||||
conf.check(header_name='execinfo.h', define_name='PBD_HAVE_EXECINFO')
|
||||
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
||||
conf.write_config_header('wafconfig.h')
|
||||
|
@ -77,6 +79,9 @@ def build(bld):
|
|||
xml++.cc
|
||||
'''
|
||||
obj.export_incdirs = ['.']
|
||||
obj.cxxflags = '-DPACKAGE=\\\"libpbd\\\"'
|
||||
if bld.env['PBD_HAVE_EXECINFO']:
|
||||
obj.cxxflags += ' -DHAVE_EXECINFO '
|
||||
obj.includes = ['.']
|
||||
obj.name = 'libpbd'
|
||||
obj.target = 'pbd'
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env python
|
||||
import autowaf
|
||||
|
||||
# Version of this package (even if built as a child)
|
||||
LIBSURFACES_VERSION = '0.0.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
|
||||
|
||||
# Mandatory variables
|
||||
srcdir = '.'
|
||||
blddir = 'build'
|
||||
|
||||
def set_options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_tool(conf, 'compiler_cxx')
|
||||
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
|
||||
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
||||
conf.write_config_header('wafconfig.h')
|
||||
|
||||
# Boost headers
|
||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
||||
|
||||
def build(bld):
|
||||
# Library
|
||||
obj = bld.new_task_gen('cxx', 'shlib')
|
||||
obj.source = '''
|
||||
control_protocol/basic_ui.cc
|
||||
control_protocol/control_protocol.cc
|
||||
control_protocol/smpte.cc
|
||||
'''
|
||||
obj.export_incdirs = ['./control_protocol']
|
||||
obj.cxxflags = '-DPACKAGE=\\\"ardour_cp\\\"'
|
||||
obj.includes = ['.', './control_protocol']
|
||||
obj.name = 'libsurfaces'
|
||||
obj.target = 'surfaces'
|
||||
obj.uselib_local = 'libardour'
|
||||
obj.vnum = LIBSURFACES_LIB_VERSION
|
||||
obj.install_path = ''
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
|
@ -28,6 +28,7 @@ taglib_files += glob.glob ('taglib/toolkit/*.cpp')
|
|||
domain = 'taglib'
|
||||
|
||||
taglib.Append(CCFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"")
|
||||
taglib.Append(CCFLAGS = "-DHAVE_CONFIG_H=1")
|
||||
# mingw may need this
|
||||
#taglib.Append(CCFLAGS="-no-undefined")
|
||||
taglib.Append(PACKAGE = domain)
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
***************************************************************************/
|
||||
|
||||
#ifndef HAVE_ZLIB
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_ZLIB
|
||||
#include <zlib.h>
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
***************************************************************************/
|
||||
|
||||
#ifndef HAVE_ZLIB
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <tdebug.h>
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ def set_options(opt):
|
|||
def configure(conf):
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_tool(conf, 'compiler_cxx')
|
||||
conf.write_config_header('config.h')
|
||||
|
||||
def build(bld):
|
||||
# Library
|
||||
|
@ -66,7 +65,7 @@ def build(bld):
|
|||
taglib/ogg/speex
|
||||
taglib/ogg/flac
|
||||
'''.split()
|
||||
obj.export_incdirs = include_dirs
|
||||
obj.export_incdirs = ['.', 'taglib', 'taglib/toolkit']
|
||||
obj.includes = include_dirs
|
||||
obj.name = 'libtaglib'
|
||||
obj.target = 'taglib'
|
||||
|
|
5
wscript
5
wscript
|
@ -15,8 +15,8 @@ children = [
|
|||
'libs/evoral',
|
||||
'libs/vamp-sdk',
|
||||
'libs/taglib',
|
||||
# 'libs/surfaces',
|
||||
# 'libs/ardour'
|
||||
'libs/surfaces',
|
||||
'libs/ardour'
|
||||
]
|
||||
|
||||
def set_options(opt):
|
||||
|
@ -31,6 +31,7 @@ def sub_config_and_use(conf, name, has_objects = True):
|
|||
def configure(conf):
|
||||
autowaf.set_recursive()
|
||||
autowaf.configure(conf)
|
||||
#conf.env.append_value('CXXFLAGS', '-DBOOST_NO_STD_LOCALE=1')
|
||||
for i in children:
|
||||
sub_config_and_use(conf, i)
|
||||
|
||||
|
|
Loading…
Reference in New Issue