fix mistaken "do not roll" conclusion in TransportFSM::compute_should_roll()
[ardour.git] / headless / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 from waflib import Options, TaskGen
4 import waflib.Logs as Logs, waflib.Utils as Utils
5 import os
6 import shutil
7 import sys
8 import re
9 import time
10 from waflib.Task import Task
11
12 # Mandatory variables
13 top = '.'
14 out = 'build'
15
16 hardour_sources = [
17         'load_session.cc',
18         'misc.cc',
19 ]
20
21 def options(opt):
22     autowaf.set_options(opt)
23
24 def configure(conf):
25     conf.load('misc')
26     conf.load('compiler_cxx')
27     autowaf.configure(conf)
28
29
30 def build(bld):
31
32     VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
33     if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
34         return
35
36     # just the normal executable version of the GTK GUI
37     obj = bld (features = 'cxx c cxxprogram')
38     # this program does not do the whole hidden symbols thing
39     obj.cxxflags = [ '-fvisibility=default' ]
40     obj.source    = hardour_sources
41     obj.target = 'hardour-' + str (bld.env['VERSION'])
42     obj.includes = ['.']
43
44     # at this point, "obj" refers to either the normal native executable
45     # OR the shared library built for use with wine on linux.
46
47     obj.use      = [ 'libpbd',
48                      'libardour',
49                      'libardour_cp',
50                      'libtemporal',
51                      'libmidipp',
52                      ]
53
54     obj.defines = [
55         'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
56         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
57         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
58         'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
59         ]
60     obj.install_path = bld.env['LIBDIR']
61     obj.uselib       = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL XML'
62     obj.uselib       += ' FFTW3F'
63     obj.uselib       += ' AUDIOUNITS OSX LO '
64     obj.uselib       += ' TAGLIB '
65
66     if sys.platform == 'darwin':
67         obj.uselib += ' AUDIOUNITS OSX'
68         obj.use    += ' libappleutility'
69     obj.includes += ['../libs']
70
71     if bld.env['build_target'] == 'mingw':
72         if bld.env['DEBUG'] == False:
73             obj.linkflags = ['-mwindows']
74
75     if bld.is_defined('NEED_INTL'):
76         obj.linkflags = ' -lintl'