Merge branch 'unify_display_ordering' of https://github.com/nmains/ardour
[ardour.git] / libs / plugins / reasonablesynth.lv2 / wscript
1 #!/usr/bin/env python
2 import os
3 import re
4 import shutil
5 import waflib.extras.autowaf as autowaf
6 from waflib import Options
7
8 # Mandatory variables
9 top = '.'
10 out = 'build'
11
12 def options(opt):
13     autowaf.set_options(opt)
14
15 def configure(conf):
16     conf.load('compiler_c')
17     autowaf.configure(conf)
18     autowaf.set_c99_mode(conf)
19     if Options.options.lv2:
20         autowaf.check_pkg(conf, 'lv2', atleast_version='1.4.0',
21                 uselib_store='LV2_1_4_0')
22
23 def build(bld):
24     bundle = 'reasonablesynth.lv2'
25     module_pat = re.sub('^lib', '', bld.env.cshlib_PATTERN)
26     module_ext = module_pat[module_pat.rfind('.'):]
27
28     if bld.is_defined ('HAVE_LV2'):
29         # Build RDF files
30         for i in ['manifest.ttl', 'reasonablesynth.ttl']:
31             bld(features     = 'subst',
32                 source       = i + '.in',
33                 target       = '../../LV2/%s/%s' % (bundle, i),
34                 install_path = '${LV2DIR}/%s' % bundle,
35                 LIB_EXT      = module_ext)
36
37         # Build plugin library
38         obj = bld(features     = 'c cshlib',
39                   source       = 'lv2.c',
40                   dep_files    = 'rsynth.c',
41                   name         = 'reasonablesynth',
42                   target       = '../../LV2/%s/reasonablesynth' % bundle,
43                   install_path = '${LV2DIR}/%s' % bundle,
44                   use          = 'LV2_1_4_0'
45                   )
46         obj.env.cshlib_PATTERN = module_pat
47
48 # vi:set ts=4 sw=4 et: