From 362e426c97d3fccf619dabd9dd74f1669f2d2579 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Aug 2012 16:34:18 +0000 Subject: Use more portable defines instead of -D in CFLAGS. git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4608 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 18 ++++++++---------- 1 file 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', -- cgit v1.2.1