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-' + str (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="' + 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') + '"',
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 '
66 if sys.platform == 'darwin':
67 obj.uselib += ' AUDIOUNITS OSX'
68 obj.use += ' libappleutility'
69 obj.includes += ['../libs']
71 if bld.env['build_target'] == 'mingw':
72 if bld.env['DEBUG'] == False:
73 obj.linkflags = ['-mwindows']
75 if bld.is_defined('NEED_INTL'):
76 obj.linkflags = ' -lintl'
80 wrapper_subst_dict = {
81 'INSTALL_PREFIX' : bld.env['PREFIX'],
82 'LIBDIR' : os.path.normpath(bld.env['LIBDIR']),
83 'DATADIR' : os.path.normpath(bld.env['DATADIR']),
84 'CONFDIR' : os.path.normpath(bld.env['CONFDIR']),
85 'LIBS' : 'build/libs',
86 'VERSION' : bld.env['VERSION'],
87 'EXECUTABLE' : 'build/headless/hardour-' + str(bld.env['VERSION'])
90 def set_subst_dict(obj, dict):
92 setattr(obj, i, dict[i])
94 obj = bld(features = 'subst')
95 obj.source = 'hardev_common.sh.in'
96 obj.target = 'hardev_common_waf.sh'
97 obj.chmod = Utils.O755
98 obj.dict = wrapper_subst_dict
99 set_subst_dict(obj, wrapper_subst_dict)