shithub: aubio

ref: f61c88a94a97bcfee7a50a8050d90ea7cb0dd7c2
dir: /examples/wscript_build/

View raw version
# 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'],
      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']):
  ctx.new_task_gen(features = 'c cprogram',
      add_objects = 'utilsio',
      includes = '../src',
      uselib = ['LASH', 'JACK', 'SNDFILE'],
      use = 'aubio',
      source = target_name,
      # program name is filename.c without the .c
      target = str(target_name).split('.')[0])