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'])
33 if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
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-' + bld.env['VERSION']
44 # at this point, "obj" refers to either the normal native executable
45 # OR the shared library built for use with wine on linux.
55 'VERSIONSTRING="' + 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 'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
61 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
62 obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL'
63 obj.uselib += ' FFTW3F'
64 obj.uselib += ' AUDIOUNITS OSX LO '
65 obj.uselib += ' TAGLIB '
67 if sys.platform == 'darwin':
68 obj.uselib += ' AUDIOUNITS OSX'
69 obj.use += ' libappleutility'
70 obj.includes += ['../libs']
72 if bld.env['build_target'] == 'mingw':
73 if bld.env['DEBUG'] == False:
74 obj.linkflags = ['-mwindows']
76 if bld.is_defined('NEED_INTL'):
77 obj.linkflags = ' -lintl'
81 wrapper_subst_dict = {
82 'INSTALL_PREFIX' : bld.env['PREFIX'],
83 'LIBDIR' : os.path.normpath(bld.env['LIBDIR']),
84 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
85 'SYSCONFDIR' : os.path.normpath(bld.env['SYSCONFDIR']),
86 'LIBS' : 'build/libs',
87 'VERSION' : bld.env['VERSION'],
88 'EXECUTABLE' : 'build/headless/hardour-' + bld.env['VERSION']
91 def set_subst_dict(obj, dict):
93 setattr(obj, i, dict[i])
95 obj = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
96 obj.source = 'hardev_common.sh.in'
97 obj.target = 'hardev_common_waf.sh'
98 obj.chmod = Utils.O755
99 obj.dict = wrapper_subst_dict
100 set_subst_dict(obj, wrapper_subst_dict)