import subprocess
import sys
import platform as PLATFORM
+from waflib.Tools import winres
def fetch_git_revision ():
cmd = "git describe HEAD"
MICRO = '0'
V = MAJOR + '.' + MINOR + '.' + MICRO
-#
-# it is important that VERSION *not* be unicode string
-# because if it is, it breaks waf somehow.
-#
-VERSION = V.encode ('ascii', 'ignore')
-PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore')
+VERSION = V
+PROGRAM_VERSION = MAJOR
# Mandatory variables
top = '.'
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')
if platform == "darwin":
- cxx_flags.append('-stdlib=libc++')
- linker_flags.append('-lc++')
+ cxx_flags.append('--stdlib=libstdc++')
+ # Mavericks and later changed the syntax to be used when including Carbon headers,
+ # from requiring a full path to requiring just the header name.
+ cxx_flags.append('-DCARBON_FLAT_HEADERS')
+ linker_flags.append('--stdlib=libstdc++')
# Prevents visibility issues in standard headers
conf.define("_DARWIN_C_SOURCE", 1)
#
compiler_flags.extend(
- ('-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align'))
+ ('-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter'))
c_flags.extend(('-Wstrict-prototypes', '-Wmissing-prototypes'))
cxx_flags.append('-Woverloaded-virtual')
help='Build the dummy backend (no audio/MIDI I/O, useful for profiling)')
opt.add_option('--with-alsabackend', action='store_true', default=False, dest='build_alsabackend',
help='Build the ALSA backend')
+ opt.add_option('--with-wavesbackend', action='store_true', default=False, dest='build_wavesbackend',
+ help='Build the Waves/Portaudio backend')
opt.add_option('--backtrace', action='store_true', default=True, dest='backtrace',
help='Compile with -rdynamic -- allow obtaining backtraces from within Ardour')
opt.add_option('--no-carbon', action='store_true', default=False, dest='nocarbon',
opt.add_option('--lv2dir', type='string', help="install destination for builtin LV2 bundles [Default: LIBDIR/lv2]")
opt.add_option('--lxvst', action='store_true', default=True, dest='lxvst',
help='Compile with support for linuxVST plugins')
+ opt.add_option('--no-lxvst', action='store_false', dest='lxvst',
+ help='Compile without support for linuxVST plugins')
opt.add_option('--nls', action='store_true', default=True, dest='nls',
help='Enable i18n (native language support) (default)')
opt.add_option('--no-nls', action='store_false', dest='nls')
def configure(conf):
conf.load('compiler_c')
conf.load('compiler_cxx')
+ if Options.options.dist_target == 'mingw':
+ conf.load('winres')
+
conf.env['VERSION'] = VERSION
conf.env['MAJOR'] = MAJOR
conf.env['MINOR'] = MINOR
conf.env['BUILD_ALSABACKEND'] = True
if opts.build_dummy:
conf.env['BUILD_DUMMYBACKEND'] = True
+ if opts.build_wavesbackend:
+ conf.env['BUILD_WAVESBACKEND'] = True
set_compiler_flags (conf, Options.options)
elif Options.options.dist_target != 'mingw':
sub_config_and_use(conf, 'tools/sanity_check')
- if Options.options.dist_target != 'mingw':
- sub_config_and_use(conf, 'libs/clearlooks-newer')
+ sub_config_and_use(conf, 'libs/clearlooks-newer')
for i in children:
sub_config_and_use(conf, i)
# write_config_text('Tranzport', opts.tranzport)
write_config_text('Unit tests', conf.env['BUILD_TESTS'])
write_config_text('Generic x86 CPU', opts.generic)
+ write_config_text('Waves Backend', opts.build_wavesbackend)
write_config_text('Windows VST support', opts.windows_vst)
write_config_text('Wiimote support', conf.is_defined('BUILD_WIIMOTE'))
write_config_text('Windows key', opts.windows_key)
elif bld.env['build_target'] != 'mingw':
bld.recurse('tools/sanity_check')
- if bld.env['build_target'] != 'mingw':
- bld.recurse('libs/clearlooks-newer')
+ bld.recurse('libs/clearlooks-newer')
for i in children:
bld.recurse(i)
- bld.install_files (bld.env['CONFDIR'], 'ardour_system.rc')
+ bld.install_files (bld.env['CONFDIR'], 'system_config')
if bld.env['RUN_TESTS']:
bld.add_post_fun(test)