shithub: aubio

ref: 1594d49e7a4c7faf2ff0cca98a04328970f1f1c3
dir: /examples/wscript_build/

View raw version
# build examples

defines = ['AUBIO_PREFIX="' + bld.env['AUBIO_PREFIX'] + '"']
defines += ['PACKAGE="' + bld.env['PACKAGE'] + '"']

bld.new_task_gen(features = 'cc',
    includes = '../src ../ext',
    source = 'utils.c',
    uselib = ['LASH'],
    defines = defines, 
    target = 'utils')

# loop over all *.c filenames in examples to build them all
for target_name in bld.path.ant_glob('*.c').split():
  # ignore utils.c
  if target_name in ['utils.c']: continue 
  bld.new_task_gen(features = 'cc cprogram', 
      add_objects = 'utils',
      includes = '../src ../ext',
      defines = defines, 
      uselib = ['LASH'],
      uselib_local = ['aubio', 'aubioext'],
      source = target_name,
      # program name is filename.c without the .c
      target = target_name.split('.')[0])