From eae5898461eaf335dee156fdc68c56d1b015ec2c Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 13 Jul 2012 13:00:12 -0600 Subject: [PATCH] src/io: moved sndfileio from examples --- examples/wscript_build | 10 ++-------- {examples => src/io}/sndfileio.c | 0 {examples => src/io}/sndfileio.h | 0 src/wscript_build | 11 +++++++---- 4 files changed, 9 insertions(+), 12 deletions(-) rename {examples => src/io}/sndfileio.c (100%) rename {examples => src/io}/sndfileio.h (100%) diff --git a/examples/wscript_build b/examples/wscript_build index 3e046566..6cb25ee0 100644 --- a/examples/wscript_build +++ b/examples/wscript_build @@ -1,20 +1,14 @@ # vim:set syntax=python: # build examples -sndfileio = ctx.new_task_gen(features = 'c', - includes = '../src', - source = ['sndfileio.c'], - target = 'sndfileio') - utilsio = ctx.new_task_gen(name = 'utilsio', features = 'c', includes = '../src', - add_objects = 'sndfileio', source = ['utils.c', 'jackio.c'], - uselib = ['LASH', 'JACK', 'SNDFILE'], + uselib = ['LASH', 'JACK'], target = 'utilsio') # loop over all *.c filenames in examples to build them all -for target_name in ctx.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c', 'sndfileio.c']): +for target_name in ctx.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c']): ctx.new_task_gen(features = 'c cprogram', add_objects = 'utilsio', includes = '../src', diff --git a/examples/sndfileio.c b/src/io/sndfileio.c similarity index 100% rename from examples/sndfileio.c rename to src/io/sndfileio.c diff --git a/examples/sndfileio.h b/src/io/sndfileio.h similarity index 100% rename from examples/sndfileio.h rename to src/io/sndfileio.h diff --git a/src/wscript_build b/src/wscript_build index f3d06382..ae241da2 100644 --- a/src/wscript_build +++ b/src/wscript_build @@ -1,11 +1,14 @@ # vim:set syntax=python: -uselib = ['SAMPLERATE'] +source = ctx.path.ant_glob('*.c **/*.c') +uselib = [] + if 'HAVE_FFTW3' in conf.get_env(): - source = ctx.path.ant_glob('*.c **/*.c', excl = ['**/ooura_fft8g.c']) + source.filter(lambda x: not x.endswith('ooura_fft8g.c')) uselib += ['FFTW3', 'FFTW3F'] -else: - source = ctx.path.ant_glob('*.c **/*.c') + +if 'HAVE_SAMPLERATE': + uselib += ['SAMPLERATE'] # build libaubio ctx.shlib( -- 2.26.2