From 29fc0c801e72a115639eabbd7373b993a25f4e79 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 2 Aug 2012 00:26:38 +0000 Subject: Fix compilation in MinGW. git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4588 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 1f7200e..024019a 100644 --- a/wscript +++ b/wscript @@ -24,7 +24,10 @@ def configure(conf): autowaf.configure(conf) autowaf.display_header('Blop.LV2 Configuration') - conf.env.append_unique('CFLAGS', '-std=c99') + if conf.env['MSVC_COMPILER']: + conf.env.append_unique('CFLAGS', ['-TP', '-MD']) + else: + conf.env.append_unique('CFLAGS', '-std=c99') autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.0', uselib_store='LV2') @@ -106,8 +109,6 @@ def build(bld): sync_square tracker '''.split() -# quantiser.so -# sequencer.so # Simple (single source file) plugins for i in plugins: @@ -144,29 +145,29 @@ def build(bld): source = ['src/wavegen.c', 'src/wdatutil.c'], target = 'src/wavegen', name = 'wavegen', - after = ['parabola', 'sawtooth', 'square'], includes = ['.', 'src/include'], lib = ['m'], install_path = None) - penv = bld.env.derive() - penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN'] + wavegen.post() - bld.add_group() # Ensure wavegen is built before the following objects - - # Waveform data + # Waveform data source for i in ['parabola', 'sawtooth', 'square']: obj = bld(rule = '${SRC} -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'), + source = wavegen.link_task.outputs[0], target = 'src/%s_data.c' % i, name = i) + penv = bld.env.derive() + penv['cshlib_PATTERN'] = bld.env['pluginlib_PATTERN'] + obj = bld(features = 'c cshlib', source = bld.path.get_bld().make_node('src/%s_data.c' % i), target = 'blop.lv2/%s_data' % i, includes = ['.', 'src/include'], env = penv, - install_path = '${LV2DIR}/blop.lv2') + install_path = '${LV2DIR}/blop.lv2', + uselib = ['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) -- cgit v1.2.1