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
20 # needed for code used from libardour
21 I18N_PACKAGE = 'ardour3'
24 autowaf.set_options(opt)
28 conf.load('compiler_cxx')
29 autowaf.configure(conf)
30 if conf.env['WINDOWS_VST_SUPPORT'] == True and Options.options.dist_target == 'mingw':
31 conf.check(compiler='cxx',
36 # Add a waf `feature' to allow compilation of things using winegcc
37 from waflib.TaskGen import feature
39 def set_winegcc(self):
40 self.env.LINK_CXX = self.env.LINK_CC = 'wineg++'
41 self.env.CC = 'winegcc'
44 VERSION = "%s.%s" % (bld.env['MAJOR'], bld.env['MINOR'])
45 if not (bld.is_defined('WINDOWS_VST_SUPPORT') or bld.is_defined('LXVST_SUPPORT')):
48 if bld.is_defined('WINDOWS_VST_SUPPORT') and bld.env['build_target'] != 'mingw':
49 # wine exec wrapper script
50 obj = bld(features = 'subst', rule= 'chmod 0755 ${TGT}')
51 obj.source = 'scanner.wine'
52 obj.target = 'ardour-vst-scanner'
53 obj.chmod = Utils.O755
54 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst')
56 'VERSION' : bld.env['VERSION'],
59 obj = bld (features = 'c cxx cxxprogram wine')
64 obj.linkflags = ['-mwindows', '-Wl,--export-dynamic']
65 obj.target = 'ardour-vst-scanner.exe.so'
66 obj.uselib = ['GIOMM', 'DL']
67 obj.use = [ 'libpbd' ]
69 obj = bld (features = 'cxx c cxxprogram')
70 if bld.is_defined('WINDOWS_VST_SUPPORT'):
71 obj.source = ( 'scanner.cc', 'vstwin.c' )
72 obj.uselib = ['GIOMM', 'DL', 'GDI32']
74 obj.source = ( 'scanner.cc' )
75 obj.uselib = ['GIOMM', 'DL']
76 obj.target = 'ardour-vst-scanner'
77 obj.use = [ 'libpbd' ]
79 obj.includes = [ '../pbd/', '../ardour/', '.' ]
84 'PACKAGE="' + I18N_PACKAGE + '"',
86 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3/fst')