aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wscript18
1 files changed, 8 insertions, 10 deletions
diff --git a/wscript b/wscript
index 024019a..fc69212 100644
--- a/wscript
+++ b/wscript
@@ -52,22 +52,20 @@ def configure(conf):
conf.env['LV2DIR'])
print('')
-def build_plugin(bld, lang, bundle, name, source, cflags=[], libs=[]):
+def build_plugin(bld, lang, bundle, name, source, defines=None):
# Build plugin library
penv = bld.env.derive()
penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN']
obj = bld(features = '%s %sshlib' % (lang,lang),
env = penv,
source = source,
- includes = [ '.', 'src/include' ],
+ includes = ['.', 'src/include'],
name = name,
target = os.path.join(bundle, name),
uselib = ['LV2'],
install_path = '${LV2DIR}/' + bundle)
- if cflags != []:
- obj.cflags = cflags
- if libs != []:
- autowaf.use_lib(bld, obj, libs)
+ if defines != None:
+ obj.defines = defines
# Install data file
data_file = '%s.ttl' % name
@@ -129,16 +127,16 @@ def build(bld):
uri = 'http://drobilla.net/plugins/blop/sequencer_%d' % i
build_plugin(bld, 'c', 'blop.lv2', 'sequencer_%d' % i,
['src/sequencer.c'],
- cflags=['-DSEQUENCER_MAX_INPUTS=%d' % i,
- '-DSEQUENCER_URI="%s"' % uri])
+ defines=['SEQUENCER_MAX_INPUTS=%d' % i,
+ 'SEQUENCER_URI="%s"' % uri])
# Quantisers
for i in [20, 50, 100]:
uri = 'http://drobilla.net/plugins/blop/quantiser_%d' % i
build_plugin(bld, 'c', 'blop.lv2', 'quantiser_%d' % i,
['src/quantiser.c'],
- cflags=['-DQUANTISER_MAX_INPUTS=%d' % i,
- '-DQUANTISER_URI="%s"' % uri])
+ defines=['QUANTISER_MAX_INPUTS=%d' % i,
+ 'QUANTISER_URI="%s"' % uri])
# Wavegen
wavegen = bld(features = 'c cprogram',