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:
parent
310d68b953
commit
0c0e689d3c
@ -95,6 +95,8 @@ def nameify(name):
|
|||||||
return name.replace('/', '_').replace('++', 'PP').replace('-', '_')
|
return name.replace('/', '_').replace('++', 'PP').replace('-', '_')
|
||||||
|
|
||||||
def check_pkg(conf, name, **args):
|
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"
|
"Check for a package iff it hasn't been checked for yet"
|
||||||
var_name = 'HAVE_' + nameify(args['uselib_store'])
|
var_name = 'HAVE_' + nameify(args['uselib_store'])
|
||||||
check = not var_name in conf.env
|
check = not var_name in conf.env
|
||||||
@ -130,7 +132,7 @@ def configure(conf):
|
|||||||
def append_cxx_flags(val):
|
def append_cxx_flags(val):
|
||||||
conf.env.append_value('CCFLAGS', val)
|
conf.env.append_value('CCFLAGS', val)
|
||||||
conf.env.append_value('CXXFLAGS', val)
|
conf.env.append_value('CXXFLAGS', val)
|
||||||
conf.line_just = 42
|
conf.line_just = 43
|
||||||
check_tool(conf, 'misc')
|
check_tool(conf, 'misc')
|
||||||
check_tool(conf, 'compiler_cc')
|
check_tool(conf, 'compiler_cc')
|
||||||
check_tool(conf, 'compiler_cxx')
|
check_tool(conf, 'compiler_cxx')
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
#define __ardour_gtk_log_meter_h__
|
#define __ardour_gtk_log_meter_h__
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
inline float
|
static inline float
|
||||||
_log_meter (float power, double lower_db, double upper_db, double non_linearity)
|
_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));
|
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)
|
alt_log_meter (float power)
|
||||||
{
|
{
|
||||||
return _log_meter (power, -192.0, 0.0, 8.0);
|
return _log_meter (power, -192.0, 0.0, 8.0);
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <gtkmm2ext/utils.h>
|
#include <gtkmm2ext/utils.h>
|
||||||
|
|
||||||
#include "evoral/SMFReader.hpp"
|
#include "evoral/SMF.hpp"
|
||||||
|
|
||||||
#include "ardour/audio_library.h"
|
#include "ardour/audio_library.h"
|
||||||
#include "ardour/auditioner.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)) {
|
} else if (SMFSource::safe_midi_file_extension (*i)) {
|
||||||
|
|
||||||
Evoral::SMFReader reader(*i);
|
Evoral::SMF reader;
|
||||||
|
reader.open(*i);
|
||||||
if (reader.num_tracks() > 1) {
|
if (reader.num_tracks() > 1) {
|
||||||
multichannel = true; // "channel" == track here...
|
multichannel = true; // "channel" == track here...
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,14 @@ def check_header_and_define(conf, header, define):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
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, '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', mandatory=True)
|
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', mandatory=True)
|
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
|
||||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
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, 'wordexp.h', 'HAVE_WORDEXP')
|
||||||
check_header_and_define(conf, 'sys/vfs.h', 'HAVE_SYS_VFS_H')
|
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')
|
conf.write_config_header('wafconfig.h')
|
||||||
|
|
||||||
# Boost headers
|
# Boost headers
|
||||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
# Library
|
# Library
|
||||||
@ -198,7 +202,7 @@ def build(bld):
|
|||||||
obj.includes = ['.', '../surfaces/control_protocol']
|
obj.includes = ['.', '../surfaces/control_protocol']
|
||||||
obj.name = 'libardour'
|
obj.name = 'libardour'
|
||||||
obj.target = 'ardour'
|
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.uselib_local = 'libpbd libmidipp libevoral libvamp libtaglib'
|
||||||
obj.vnum = LIBARDOUR_LIB_VERSION
|
obj.vnum = LIBARDOUR_LIB_VERSION
|
||||||
obj.install_path = ''
|
obj.install_path = ''
|
||||||
@ -210,6 +214,8 @@ def build(bld):
|
|||||||
os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
|
os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
|
||||||
obj.cxxflags += ' -DVAMP_DIR=\\\"' + os.path.join(
|
obj.cxxflags += ' -DVAMP_DIR=\\\"' + os.path.join(
|
||||||
os.path.normpath(bld.env['LIBDIRNAME']), 'ardour3', 'vamp') + '\\\"'
|
os.path.normpath(bld.env['LIBDIRNAME']), 'ardour3', 'vamp') + '\\\"'
|
||||||
|
obj.source += ' st_stretch.cc st_pitch.cc '
|
||||||
|
obj.uselib += ' SOUNDTOUCH '
|
||||||
|
|
||||||
def shutdown():
|
def shutdown():
|
||||||
autowaf.shutdown()
|
autowaf.shutdown()
|
||||||
|
@ -26,14 +26,14 @@ def set_options(opt):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
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, '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', mandatory=True)
|
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', mandatory=True)
|
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)
|
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
|
||||||
|
|
||||||
# Boost headers
|
# Boost headers
|
||||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
# Headers
|
# Headers
|
||||||
|
@ -24,22 +24,22 @@ def set_options(opt):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
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, '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', mandatory=True)
|
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', mandatory=True)
|
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
|
||||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
|
||||||
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0', mandatory=True)
|
autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
|
||||||
|
|
||||||
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
||||||
conf.write_config_header('wafconfig.h')
|
conf.write_config_header('wafconfig.h')
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
conf.env['SYSMIDI'] == 'JACK MIDI'
|
conf.env['SYSMIDI'] = 'JACK MIDI'
|
||||||
conf.env.append_value('CXXFLAGS', '-DWITH_JACK_MIDI')
|
conf.env.append_value('CXXFLAGS', '-DWITH_JACK_MIDI')
|
||||||
|
|
||||||
# Boost headers
|
# Boost headers
|
||||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
# Library
|
# Library
|
||||||
|
@ -24,11 +24,11 @@ def set_options(opt):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
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, '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', mandatory=True)
|
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', mandatory=True)
|
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
|
||||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
|
||||||
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
|
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
|
||||||
|
|
||||||
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
|
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')
|
conf.write_config_header('wafconfig.h')
|
||||||
|
|
||||||
# Boost headers
|
# Boost headers
|
||||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
# Library
|
# Library
|
||||||
|
@ -24,18 +24,18 @@ def set_options(opt):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
autowaf.configure(conf)
|
autowaf.configure(conf)
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
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, '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', mandatory=True)
|
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', mandatory=True)
|
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
|
||||||
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
|
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
|
||||||
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
|
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
|
||||||
|
|
||||||
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
|
||||||
conf.write_config_header('wafconfig.h')
|
conf.write_config_header('wafconfig.h')
|
||||||
|
|
||||||
# Boost headers
|
# Boost headers
|
||||||
autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
||||||
autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
# Library
|
# Library
|
||||||
|
@ -31,7 +31,7 @@ def build(bld):
|
|||||||
obj = bld.new_task_gen('cxx', 'shlib')
|
obj = bld.new_task_gen('cxx', 'shlib')
|
||||||
prefix = 'libs/taglib/'
|
prefix = 'libs/taglib/'
|
||||||
sources = glob.glob(prefix + 'taglib/*.cpp')
|
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/mpc/*.cpp')
|
||||||
sources += glob.glob(prefix + 'taglib/mpeg/*.cpp')
|
sources += glob.glob(prefix + 'taglib/mpeg/*.cpp')
|
||||||
sources += glob.glob(prefix + 'taglib/mpeg/id3v1/*.cpp')
|
sources += glob.glob(prefix + 'taglib/mpeg/id3v1/*.cpp')
|
||||||
|
Loading…
Reference in New Issue
Block a user