src/io: moved sndfileio from examples
authorPaul Brossier <piem@piem.org>
Fri, 13 Jul 2012 19:00:12 +0000 (13:00 -0600)
committerPaul Brossier <piem@piem.org>
Fri, 13 Jul 2012 19:00:12 +0000 (13:00 -0600)
examples/wscript_build
src/io/sndfileio.c [moved from examples/sndfileio.c with 100% similarity]
src/io/sndfileio.h [moved from examples/sndfileio.h with 100% similarity]
src/wscript_build

index 3e046566f2916811eabd683f6ff11a2aca5be8a5..6cb25ee0c6687fe35a4eccc0bea485cd327cbb56 100644 (file)
@@ -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',
similarity index 100%
rename from examples/sndfileio.c
rename to src/io/sndfileio.c
similarity index 100%
rename from examples/sndfileio.h
rename to src/io/sndfileio.h
index f3d06382ce62138e8a69e2a67c9a86a50c1319e8..ae241da2b70c12a9a6fe6561353d1884bb71d1c7 100644 (file)
@@ -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(