diff options
author | Robin Gareus <robin@gareus.org> | 2015-12-16 00:25:07 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-12-16 00:25:07 +0100 |
commit | b228c1131187f3822ece3bd6ed26869a68fb0dff (patch) | |
tree | cea750878ac04fc188f68c1fb761ff9422c8dab8 /session_utils/wscript | |
parent | f05afd973b538a2e1543423f42d6859c0254f7ca (diff) |
commandline session utilities
Diffstat (limited to 'session_utils/wscript')
-rw-r--r-- | session_utils/wscript | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/session_utils/wscript b/session_utils/wscript new file mode 100644 index 0000000000..de9111e3e5 --- /dev/null +++ b/session_utils/wscript @@ -0,0 +1,94 @@ +#!/usr/bin/env python +from waflib.extras import autowaf as autowaf +from waflib import Options, TaskGen +import waflib.Logs as Logs, waflib.Utils as Utils +import os +import shutil +import sys +import re +import time +from waflib.Task import Task + +# Mandatory variables +top = '.' +out = 'build' + +def options(opt): + autowaf.set_options(opt) + +def configure(conf): + conf.load('misc') + conf.load('compiler_cxx') + autowaf.configure(conf) + +def build_ardour_util(bld, util): + pgmprefix = bld.env['PROGRAM_NAME'].lower() + str(bld.env['MAJOR']) + + # just the normal executable version of the GTK GUI + obj = bld (features = 'cxx c cxxprogram') + # this program does not do the whole hidden symbols thing + obj.cxxflags = [ '-fvisibility=default' ] + obj.source = ['common.cc', util + '.cc' ] + obj.target = pgmprefix + '-' + util + obj.includes = ['.'] + obj.use = [ 'libpbd', + 'libardour', + 'libardour_cp', + 'libtimecode', + 'libmidipp', + ] + obj.defines = [ + 'VERSIONSTRING="' + str(bld.env['VERSION']) + '"', + 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"', + 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"', + 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', + 'PACKAGE="' + "ARDOURUTILS" + '"', + ] + obj.install_path = bld.env['LIBDIR'] + '/utils' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL' + obj.uselib += ' FFTW3F' + obj.uselib += ' AUDIOUNITS OSX LO ' + obj.uselib += ' TAGLIB ' + + if sys.platform == 'darwin': + obj.uselib += ' AUDIOUNITS OSX' + obj.use += ' libappleutility' + obj.includes += ['../libs'] + + if bld.env['build_target'] == 'mingw': + if bld.env['DEBUG'] == False: + obj.linkflags = ['-mwindows'] + + if bld.is_defined('NEED_INTL'): + obj.linkflags = ' -lintl' + + +def build(bld): + VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR']) + # no wine + if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw': + return + + # don't build/install windows version just yet. + # tools/x-win/package.sh uses 'waf install'. The symlinks + # and shell wrapper script won't work on windows. + if bld.env['build_target'] == 'mingw': + return + + pgmprefix = bld.env['PROGRAM_NAME'].lower() + str(bld.env['MAJOR']) + + utils = bld.path.ant_glob('*.cc', excl=['example.cc', 'common.cc']) + + for util in utils: + fn = str(util)[:-3] + build_ardour_util(bld, fn) + bld.symlink_as(bld.env['BINDIR'] + '/' + pgmprefix + "-" + fn, bld.env['LIBDIR'] + '/utils/ardour-util.sh') + + obj = bld(features = 'subst') + obj.source = 'ardour-util.sh.in' + obj.target = 'ardour-util.sh' + obj.chmod = Utils.O755 + obj.install_path = bld.env['LIBDIR'] + '/utils' + obj.LIBDIR = os.path.normpath(bld.env['DLLDIR']) + obj.DATADIR = os.path.normpath(bld.env['DATADIR']) + obj.CONFDIR = os.path.normpath(bld.env['CONFDIR']) |