Waf building of gtk2_ardour.

git-svn-id: svn://localhost/ardour2/branches/3.0@4662 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-02-25 23:21:49 +00:00
parent 310d68b953
commit 0c0e689d3c
10 changed files with 52 additions and 41 deletions

View File

@ -95,6 +95,8 @@ def nameify(name):
return name.replace('/', '_').replace('++', 'PP').replace('-', '_')
def check_pkg(conf, name, **args):
if not 'mandatory' in args:
args['mandatory'] = True
"Check for a package iff it hasn't been checked for yet"
var_name = 'HAVE_' + nameify(args['uselib_store'])
check = not var_name in conf.env
@ -130,7 +132,7 @@ def configure(conf):
def append_cxx_flags(val):
conf.env.append_value('CCFLAGS', val)
conf.env.append_value('CXXFLAGS', val)
conf.line_just = 42
conf.line_just = 43
check_tool(conf, 'misc')
check_tool(conf, 'compiler_cc')
check_tool(conf, 'compiler_cxx')

View File

@ -21,13 +21,13 @@
#define __ardour_gtk_log_meter_h__
#if 1
inline float
static inline float
_log_meter (float power, double lower_db, double upper_db, double non_linearity)
{
return (power < lower_db ? 0.0 : pow((power-lower_db)/(upper_db-lower_db), non_linearity));
}
inline float
static inline float
alt_log_meter (float power)
{
return _log_meter (power, -192.0, 0.0, 8.0);

View File

@ -37,7 +37,7 @@
#include <gtkmm2ext/utils.h>
#include "evoral/SMFReader.hpp"
#include "evoral/SMF.hpp"
#include "ardour/audio_library.h"
#include "ardour/auditioner.h"
@ -1100,7 +1100,8 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool&
} else if (SMFSource::safe_midi_file_extension (*i)) {
Evoral::SMFReader reader(*i);
Evoral::SMF reader;
reader.open(*i);
if (reader.num_tracks() > 1) {
multichannel = true; // "channel" == track here...
}

View File

@ -31,10 +31,14 @@ def check_header_and_define(conf, header, 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)
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH')
check_header_and_define(conf, 'wordexp.h', 'HAVE_WORDEXP')
check_header_and_define(conf, 'sys/vfs.h', 'HAVE_SYS_VFS_H')
@ -46,8 +50,8 @@ def configure(conf):
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)
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
def build(bld):
# Library
@ -198,7 +202,7 @@ def build(bld):
obj.includes = ['.', '../surfaces/control_protocol']
obj.name = 'libardour'
obj.target = 'ardour'
obj.uselib = 'GLIBMM SIGCPP XML UUID'
obj.uselib = 'GLIBMM SIGCPP XML UUID JACK SNDFILE'
obj.uselib_local = 'libpbd libmidipp libevoral libvamp libtaglib'
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = ''
@ -210,6 +214,8 @@ def build(bld):
os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
obj.cxxflags += ' -DVAMP_DIR=\\\"' + os.path.join(
os.path.normpath(bld.env['LIBDIRNAME']), 'ardour3', 'vamp') + '\\\"'
obj.source += ' st_stretch.cc st_pitch.cc '
obj.uselib += ' SOUNDTOUCH '
def shutdown():
autowaf.shutdown()

View File

@ -26,14 +26,14 @@ def 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, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0', mandatory=True)
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
# Boost headers
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
def build(bld):
# Headers

View File

@ -24,22 +24,22 @@ def 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, 'jack', uselib_store='JACK', atleast_version='0.109.0', mandatory=True)
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
conf.write_config_header('wafconfig.h')
# TODO
conf.env['SYSMIDI'] == 'JACK MIDI'
conf.env['SYSMIDI'] = 'JACK MIDI'
conf.env.append_value('CXXFLAGS', '-DWITH_JACK_MIDI')
# Boost headers
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
def build(bld):
# Library

View File

@ -24,11 +24,11 @@ def 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)
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
@ -39,8 +39,8 @@ def configure(conf):
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)
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
def build(bld):
# Library

View File

@ -24,18 +24,18 @@ def 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)
autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
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)
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
def build(bld):
# Library

View File

@ -31,7 +31,7 @@ def build(bld):
obj = bld.new_task_gen('cxx', 'shlib')
prefix = 'libs/taglib/'
sources = glob.glob(prefix + 'taglib/*.cpp')
sources += glob.glob(prefix + 'libs//taglib/flac/*.cpp')
sources += glob.glob(prefix + 'taglib/flac/*.cpp')
sources += glob.glob(prefix + 'taglib/mpc/*.cpp')
sources += glob.glob(prefix + 'taglib/mpeg/*.cpp')
sources += glob.glob(prefix + 'taglib/mpeg/id3v1/*.cpp')

View File

@ -16,7 +16,9 @@ children = [
'libs/vamp-sdk',
'libs/taglib',
'libs/surfaces',
'libs/ardour'
'libs/ardour',
'libs/gtkmm2ext',
'gtk2_ardour'
]
def set_options(opt):