diff options
author | David Robillard <d@drobilla.net> | 2011-10-04 03:19:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-04 03:19:25 +0000 |
commit | 7c7e2918bdd051fb213944d53043a457a0d9ac34 (patch) | |
tree | a44b3ce7b085251e77e22f59ab3b5b46a2749590 /wscript | |
parent | e550736dbb862d8333a4d7f2ede9804a3d48326c (diff) | |
download | blop.lv2-7c7e2918bdd051fb213944d53043a457a0d9ac34.tar.gz blop.lv2-7c7e2918bdd051fb213944d53043a457a0d9ac34.tar.bz2 blop.lv2-7c7e2918bdd051fb213944d53043a457a0d9ac34.zip |
Build oscillator data and load it from LV2 bundle.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blip.lv2@3526 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 33 |
1 files changed, 32 insertions, 1 deletions
@@ -44,6 +44,8 @@ def configure(conf): conf.env['pluginlib_PATTERN'] = pat conf.env['pluginlib_EXT'] = pat[pat.rfind('.'):] + conf.define('BLIP_SHLIB_EXT', conf.env['pluginlib_EXT']) + autowaf.display_msg(conf, "LV2 bundle directory", conf.env['LV2DIR']) print('') @@ -58,7 +60,6 @@ def build_plugin(bld, lang, bundle, name, source, cflags=[], libs=[]): obj.includes = [ '.', './src/include' ] obj.name = name obj.target = os.path.join(bundle, name) - obj.linkflags = [ '-nostartfiles' ] if cflags != []: obj.cflags = cflags if libs != []: @@ -122,5 +123,35 @@ def build(bld): build_plugin(bld, 'c', 'blip.lv2', i, ['src/%s.c' % i, 'src/wavedata.c']) + # Wavegen + wavegen = bld(features = 'c cprogram', + source = ['src/wavegen.c', 'src/wdatutil.c'], + target = 'src/wavegen', + name = 'wavegen', + after = ['parabola', 'sawtooth', 'square'], + includes = ['./src', './src/include'], + linkflags = ['-lm'], + install_path = None) + + penv = bld.env.derive() + penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN'] + + # Waveform data + for i in ['parabola', 'sawtooth', 'square']: + obj = bld(rule = './src/wavegen -r 48000 -f 12 -s 1 -m 128 -g 1.0 -w %s -p %s -o ${TGT}' % (i, i), + source = bld.path.get_bld().make_node('src/wavegen'), + target = 'src/%s_data.c' % i, + before = ['wavegen'], + name = i) + + obj = bld(features = 'c cshlib', + source = 'src/%s_data.c' % i, + target = 'blip.lv2/%s_data' % i, + includes = ['./src', './src/include'], + env = penv, + install_path = '${LV2DIR}/blip.lv2') + + + def lint(ctx): subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-readability/todo,-build/include src/* serd/*', shell=True) |