summaryrefslogtreecommitdiff
path: root/headless/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'headless/wscript')
-rw-r--r--headless/wscript96
1 files changed, 96 insertions, 0 deletions
diff --git a/headless/wscript b/headless/wscript
new file mode 100644
index 0000000000..3df0e09e93
--- /dev/null
+++ b/headless/wscript
@@ -0,0 +1,96 @@
+#!/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'
+
+hardour_sources = [
+ 'load_session.cc',
+ 'misc.cc',
+]
+
+def options(opt):
+ autowaf.set_options(opt)
+
+def configure(conf):
+ conf.load('misc')
+ conf.load('compiler_cxx')
+ autowaf.configure(conf)
+
+
+def build(bld):
+
+ VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
+
+ # just the normal executable version of the GTK GUI
+ obj = bld (features = 'cxx c cxxprogram')
+ obj.source = hardour_sources
+ obj.target = 'hardour-' + bld.env['VERSION']
+ obj.includes = ['.']
+
+ # at this point, "obj" refers to either the normal native executable
+ # OR the shared library built for use with wine on linux.
+
+ obj.use = [ 'libpbd',
+ 'libardour',
+ 'libardour_cp',
+ 'libtimecode',
+ 'libmidipp',
+ ]
+
+ obj.defines = [
+ 'VERSIONSTRING="' + 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') + '"',
+ 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
+ ]
+ obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
+ 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'
+
+ # Wrappers
+
+ wrapper_subst_dict = {
+ 'INSTALL_PREFIX' : bld.env['PREFIX'],
+ 'LIBDIR' : os.path.normpath(bld.env['LIBDIR']),
+ 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
+ 'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']),
+ 'LIBS' : 'build/libs',
+ 'VERSION' : bld.env['VERSION'],
+ 'EXECUTABLE' : 'build/headless/hardour-' + bld.env['VERSION']
+ }
+
+ def set_subst_dict(obj, dict):
+ for i in dict:
+ setattr(obj, i, dict[i])
+
+ obj = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
+ obj.source = 'hardev_common.sh.in'
+ obj.target = 'hardev_common_waf.sh'
+ obj.chmod = Utils.O755
+ obj.dict = wrapper_subst_dict
+ set_subst_dict(obj, wrapper_subst_dict)