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