2 from waflib.extras import autowaf as autowaf
3 from waflib import Options, TaskGen
4 import waflib.Logs as Logs, waflib.Utils as Utils
10 from waflib.Task import Task
22 autowaf.set_options(opt)
26 conf.load('compiler_cxx')
27 autowaf.configure(conf)
32 VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
34 # just the normal executable version of the GTK GUI
35 obj = bld (features = 'cxx c cxxprogram')
36 obj.source = hardour_sources
37 obj.target = 'hardour-' + bld.env['VERSION']
40 # at this point, "obj" refers to either the normal native executable
41 # OR the shared library built for use with wine on linux.
51 'VERSIONSTRING="' + bld.env['VERSION'] + '"',
52 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
53 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
54 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
55 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
57 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
58 obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL'
59 obj.uselib += ' FFTW3F'
60 obj.uselib += ' AUDIOUNITS OSX LO '
61 obj.uselib += ' TAGLIB '
63 if sys.platform == 'darwin':
64 obj.uselib += ' AUDIOUNITS OSX'
65 obj.use += ' libappleutility'
66 obj.includes += ['../libs']
68 if bld.env['build_target'] == 'mingw':
69 if bld.env['DEBUG'] == False:
70 obj.linkflags = ['-mwindows']
72 if bld.is_defined('NEED_INTL'):
73 obj.linkflags = ' -lintl'
77 wrapper_subst_dict = {
78 'INSTALL_PREFIX' : bld.env['PREFIX'],
79 'LIBDIR' : os.path.normpath(bld.env['LIBDIR']),
80 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
81 'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']),
82 'LIBS' : 'build/libs',
83 'VERSION' : bld.env['VERSION'],
84 'EXECUTABLE' : 'build/headless/hardour-' + bld.env['VERSION']
87 def set_subst_dict(obj, dict):
89 setattr(obj, i, dict[i])
91 obj = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
92 obj.source = 'hardev_common.sh.in'
93 obj.target = 'hardev_common_waf.sh'
94 obj.chmod = Utils.O755
95 obj.dict = wrapper_subst_dict
96 set_subst_dict(obj, wrapper_subst_dict)