2009-02-25 12:51:42 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import autowaf
|
2009-02-26 23:40:44 -05:00
|
|
|
import os
|
2009-08-08 18:36:32 -04:00
|
|
|
import sys
|
2009-02-25 12:51:42 -05:00
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
2009-02-25 21:24:16 -05:00
|
|
|
MAJOR = '4'
|
|
|
|
MINOR = '1'
|
|
|
|
MICRO = '0'
|
|
|
|
LIBPBD_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
|
2009-02-25 12:51:42 -05:00
|
|
|
|
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
LIBPBD_LIB_VERSION = '4.1.0'
|
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'libpbd'
|
|
|
|
VERSION = LIBPBD_VERSION
|
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
srcdir = '.'
|
|
|
|
blddir = 'build'
|
|
|
|
|
2009-02-25 21:24:16 -05:00
|
|
|
path_prefix = 'libs/pbd/'
|
|
|
|
|
2009-02-25 12:51:42 -05:00
|
|
|
def set_options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
2009-02-25 21:24:16 -05:00
|
|
|
autowaf.build_version_files(path_prefix+'pbd/version.h', path_prefix+'version.cc',
|
|
|
|
'libpbd', MAJOR, MINOR, MICRO)
|
2009-02-25 12:51:42 -05:00
|
|
|
autowaf.configure(conf)
|
2009-07-22 16:51:13 -04:00
|
|
|
conf.check_tool('compiler_cxx')
|
2009-02-25 18:21:49 -05:00
|
|
|
autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
|
2009-02-25 19:05:51 -05:00
|
|
|
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
|
2009-08-08 18:36:32 -04:00
|
|
|
if sys.platform != 'darwin':
|
|
|
|
autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
|
2009-02-25 12:51:42 -05:00
|
|
|
|
|
|
|
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
|
2009-07-17 18:12:21 -04:00
|
|
|
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO')
|
2009-02-25 12:51:42 -05:00
|
|
|
|
2009-07-12 20:26:28 -04:00
|
|
|
conf.write_config_header('libpbd-config.h')
|
2009-02-25 12:51:42 -05:00
|
|
|
|
|
|
|
# Boost headers
|
2009-02-25 18:21:49 -05:00
|
|
|
autowaf.check_header(conf, 'boost/shared_ptr.hpp')
|
|
|
|
autowaf.check_header(conf, 'boost/weak_ptr.hpp')
|
2009-02-25 12:51:42 -05:00
|
|
|
|
|
|
|
def build(bld):
|
|
|
|
# Library
|
|
|
|
obj = bld.new_task_gen('cxx', 'shlib')
|
|
|
|
obj.source = '''
|
|
|
|
basename.cc
|
|
|
|
base_ui.cc
|
2009-11-23 12:33:39 -05:00
|
|
|
boost_debug.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
command.cc
|
|
|
|
convert.cc
|
|
|
|
controllable.cc
|
2009-12-31 18:43:47 -05:00
|
|
|
controllable_descriptor.cc
|
2009-12-08 22:05:14 -05:00
|
|
|
crossthread.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
enumwriter.cc
|
2009-12-21 13:23:07 -05:00
|
|
|
event_loop.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
dmalloc.cc
|
2009-12-30 11:48:58 -05:00
|
|
|
enums.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
error.cc
|
|
|
|
filesystem.cc
|
|
|
|
filesystem_paths.cc
|
|
|
|
file_utils.cc
|
|
|
|
fpu.cc
|
|
|
|
id.cc
|
2009-10-28 17:36:40 -04:00
|
|
|
locale_guard.cc
|
2009-04-23 13:48:37 -04:00
|
|
|
malign.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
mountpoint.cc
|
|
|
|
pathscanner.cc
|
|
|
|
pool.cc
|
|
|
|
pthread_utils.cc
|
|
|
|
receiver.cc
|
|
|
|
search_path.cc
|
|
|
|
shortpath.cc
|
2009-12-19 15:26:31 -05:00
|
|
|
signals.cc
|
2009-02-25 12:51:42 -05:00
|
|
|
stacktrace.cc
|
|
|
|
stateful.cc
|
|
|
|
strreplace.cc
|
|
|
|
strsplit.cc
|
|
|
|
textreceiver.cc
|
|
|
|
transmitter.cc
|
|
|
|
undo.cc
|
|
|
|
uuid.cc
|
|
|
|
version.cc
|
|
|
|
whitespace.cc
|
|
|
|
xml++.cc
|
|
|
|
'''
|
|
|
|
obj.export_incdirs = ['.']
|
|
|
|
obj.includes = ['.']
|
|
|
|
obj.name = 'libpbd'
|
|
|
|
obj.target = 'pbd'
|
|
|
|
obj.uselib = 'GLIBMM SIGCPP XML UUID'
|
|
|
|
obj.vnum = LIBPBD_LIB_VERSION
|
2009-02-26 23:40:44 -05:00
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
2009-04-18 12:15:12 -04:00
|
|
|
obj.cxxflags = ['-DPACKAGE="libpbd"']
|
2009-07-17 18:12:21 -04:00
|
|
|
|
|
|
|
if bld.env['build_target'] == 'x86_64':
|
|
|
|
obj.cxxflags += [ '-DUSE_X86_64_ASM' ]
|
2009-05-04 18:10:15 -04:00
|
|
|
|
2009-02-25 12:51:42 -05:00
|
|
|
def shutdown():
|
|
|
|
autowaf.shutdown()
|
|
|
|
|