shithub: aubio

ref: 9b23eb311431d5862a5920b69082cca1a93bcb8e
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])