2016-01-30 11:26:14 -05:00
|
|
|
#!/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
|
|
|
|
|
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
conf.load('misc')
|
|
|
|
conf.load('compiler_cxx')
|
|
|
|
conf.check_cc(function_name='readline',
|
|
|
|
header_name='stdio.h readline/readline.h',
|
|
|
|
lib='readline',
|
|
|
|
uselib_store='READLINE',
|
|
|
|
mandatory=False)
|
|
|
|
autowaf.configure(conf)
|
|
|
|
|
|
|
|
def build(bld):
|
|
|
|
VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
|
|
|
|
if not bld.is_defined('HAVE_READLINE'):
|
|
|
|
return;
|
|
|
|
# no wine
|
|
|
|
if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
|
|
|
|
return
|
|
|
|
|
2016-04-11 16:19:25 -04:00
|
|
|
if bld.env['build_target'] != 'mingw':
|
2016-01-30 11:26:14 -05:00
|
|
|
# TEST/DEVEL TOOL #######################
|
2016-04-11 16:19:25 -04:00
|
|
|
obj = bld (features = 'cxx c cxxprogram')
|
|
|
|
obj.source = 'devel.cc'
|
|
|
|
obj.target = 'devel'
|
|
|
|
obj.uselib = ['SIGCPP', 'READLINE']
|
|
|
|
obj.use = ['liblua']
|
|
|
|
obj.install_path = None
|
2016-01-30 11:26:14 -05:00
|
|
|
#########################################
|
|
|
|
|
2019-06-04 09:15:21 -04:00
|
|
|
# commandline luasession wrapper script
|
|
|
|
if bld.env['build_target'] != 'mingw':
|
|
|
|
obj = bld(features = 'subst')
|
|
|
|
obj.source = 'ardour-lua.sh.in'
|
|
|
|
obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua'
|
|
|
|
obj.chmod = Utils.O755
|
|
|
|
obj.install_path = bld.env['BINDIR']
|
|
|
|
obj.LIBDIR = os.path.normpath(bld.env['DLLDIR'])
|
|
|
|
obj.DATADIR = os.path.normpath(bld.env['DATADIR'])
|
|
|
|
obj.CONFDIR = os.path.normpath(bld.env['CONFDIR'])
|
2016-01-30 11:26:14 -05:00
|
|
|
|
|
|
|
# commandline luasession
|
|
|
|
obj = bld (features = 'cxx c cxxprogram')
|
|
|
|
obj.source = 'luasession.cc'
|
|
|
|
obj.target = 'luasession'
|
|
|
|
obj.includes = ['../libs']
|
|
|
|
obj.use = ['liblua'
|
|
|
|
'libpbd',
|
|
|
|
'libardour',
|
|
|
|
'libardour_cp',
|
2017-09-24 12:03:54 -04:00
|
|
|
'libtemporal',
|
2016-01-30 11:26:14 -05:00
|
|
|
'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" + '"',
|
|
|
|
]
|
|
|
|
|
2016-02-28 15:16:44 -05:00
|
|
|
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL XML'
|
2016-01-30 11:26:14 -05:00
|
|
|
obj.uselib += ' FFTW3F'
|
|
|
|
obj.uselib += ' AUDIOUNITS OSX LO '
|
|
|
|
obj.uselib += ' TAGLIB '
|
|
|
|
obj.uselib += ' READLINE '
|
|
|
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
obj.uselib += ' AUDIOUNITS OSX'
|
|
|
|
obj.use += ' libappleutility'
|
|
|
|
|
|
|
|
#if bld.env['build_target'] == 'mingw':
|
|
|
|
# if bld.env['DEBUG'] == False:
|
|
|
|
# obj.linkflags = ['-mwindows']
|
|
|
|
|
|
|
|
if bld.is_defined('NEED_INTL'):
|
|
|
|
obj.linkflags = ' -lintl'
|
|
|
|
|
2019-06-04 09:15:21 -04:00
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
|
|
obj.install_path = bld.env['BINDIR']
|
|
|
|
obj.target = 'ardour' + str (bld.env['MAJOR']) + '-lua'
|
|
|
|
else:
|
|
|
|
obj.install_path = bld.env['DLLDIR']
|