shithub: aubio

ref: 1342c2f184764c8b3128dcd04a5b9306a708569b
dir: /examples/wscript_build/

View raw version
# build examples

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

extra_source = ['utils.c', 'sndfileio.c', 'jackio.c']

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

# 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 extra_source: continue 
  bld.new_task_gen(features = 'cc cprogram', 
      add_objects = 'utils_io',
      includes = '../src',
      defines = defines, 
      uselib = ['LASH', 'JACK', 'SNDFILE'],
      uselib_local = ['aubio'],
      source = target_name,
      # program name is filename.c without the .c
      target = target_name.split('.')[0])