shithub: aubio

ref: 0fbb694feda4ab4841a07762c7767301f3a68baf
dir: /examples/wscript_build/

View raw version
# vim:set syntax=python:

lib = 'm' if 'CL.exe' not in ctx.env.CC[0] else None

uselib = []
uselib += ['FFTW3', 'FFTW3F']
uselib += ['SAMPLERATE']
uselib += ['SNDFILE']
uselib += ['AVCODEC']
uselib += ['AVFORMAT']
uselib += ['AVRESAMPLE']
uselib += ['AVUTIL']
uselib += ['JACK']
uselib += ['BLAS']

utils_source = ['utils.c', 'jackio.c']
programs_source = ctx.path.ant_glob('*.c', excl = utils_source)

# build examples
bld(features = 'c',
        source = utils_source,
        includes = ['../src'],
        uselib = uselib,
        target = 'utilsio')

# loop over all *.c filenames in examples to build them all
for source_file in programs_source:
    bld(features = 'c cprogram',
            includes = '../src',
            lib = lib,
            use = ['aubio', 'utilsio'],
            uselib = uselib,
            source = source_file,
            target = str(source_file).split('.')[0]
            )