2005-05-13 16:47:18 -04:00
|
|
|
# -*- python -*-
|
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
import os
|
|
|
|
import os.path
|
2005-05-13 16:47:18 -04:00
|
|
|
import glob
|
|
|
|
|
2006-04-25 20:45:27 -04:00
|
|
|
Import('env libraries i18n install_prefix')
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd = env.Copy()
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
domain = 'libpbd'
|
2006-04-24 18:45:19 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd.Append(DOMAIN=domain,MAJOR=4,MINOR=1,MICRO=0)
|
|
|
|
pbd.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
|
|
|
|
pbd.Append(CXXFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
|
|
|
|
pbd.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
|
|
|
|
pbd.Append(PACKAGE=domain)
|
|
|
|
pbd.Append(POTFILE=domain + '.pot')
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd_files = Split("""
|
2005-05-13 16:47:18 -04:00
|
|
|
basename.cc
|
2006-04-24 18:45:19 -04:00
|
|
|
base_ui.cc
|
2006-04-25 16:23:50 -04:00
|
|
|
convert.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
dmalloc.cc
|
2006-06-21 19:01:03 -04:00
|
|
|
error.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
mountpoint.cc
|
2006-06-29 12:29:19 -04:00
|
|
|
path.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
pathscanner.cc
|
|
|
|
pool.cc
|
|
|
|
pthread_utils.cc
|
|
|
|
receiver.cc
|
2006-02-15 10:55:48 -05:00
|
|
|
stacktrace.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
strsplit.cc
|
|
|
|
textreceiver.cc
|
|
|
|
transmitter.cc
|
|
|
|
undo.cc
|
|
|
|
version.cc
|
2006-01-13 14:48:55 -05:00
|
|
|
whitespace.cc
|
2005-05-13 16:47:18 -04:00
|
|
|
xml++.cc
|
|
|
|
""")
|
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
conf = Configure(pbd)
|
2005-05-13 16:47:18 -04:00
|
|
|
if conf.CheckFunc('getmntent'):
|
|
|
|
conf.env.Append(CCFLAGS="-DHAVE_GETMNTENT")
|
2006-02-15 10:55:48 -05:00
|
|
|
if conf.CheckCHeader('execinfo.h'):
|
|
|
|
conf.env.Append(CXXFLAGS="-DHAVE_EXECINFO")
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd = conf.Finish()
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd.Merge ([ libraries['sigc2'], libraries['xml'], libraries['glibmm2'], libraries['glib2'] ])
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
libpbd = pbd.SharedLibrary('pbd', pbd_files)
|
|
|
|
Default(libpbd)
|
2006-01-09 23:25:47 -05:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
mount_env = Environment(CCFLAGS='-DTEST_MOUNTPOINT -Ilibs/pbd')
|
2006-06-29 12:29:19 -04:00
|
|
|
mount_env.Program('mountpoint', 'mountpoint.cc')
|
|
|
|
|
2006-04-24 18:45:19 -04:00
|
|
|
if env['NLS']:
|
2006-06-29 18:21:30 -04:00
|
|
|
i18n (pbd, pbd_files, env)
|
2006-04-24 18:45:19 -04:00
|
|
|
|
2006-06-29 18:21:30 -04:00
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), libpbd))
|
2006-04-25 20:45:27 -04:00
|
|
|
|
2006-01-09 23:25:47 -05:00
|
|
|
env.Alias('tarball', env.Distribute (env['DISTTREE'],
|
2006-05-30 22:46:04 -04:00
|
|
|
[ 'SConscript', 'i18n.h', 'gettext.h', 'pbd/abstract_ui.cc' ] +
|
2006-06-29 18:21:30 -04:00
|
|
|
pbd_files +
|
2006-04-24 18:45:19 -04:00
|
|
|
glob.glob('po/*.po') +
|
|
|
|
glob.glob('pbd/*.h')))
|