src/wscript_build: only no -lm if compiler is CL.exe
[aubio.git] / tests / wscript_build
1 # vim:set syntax=python:
2
3 lib = 'm' if 'CL.exe' not in ctx.env.CC[0] else None
4
5 uselib = []
6 uselib += ['FFTW3', 'FFTW3F']
7 uselib += ['SAMPLERATE']
8 uselib += ['SNDFILE']
9 uselib += ['AVCODEC']
10 uselib += ['AVFORMAT']
11 uselib += ['AVRESAMPLE']
12 uselib += ['AVUTIL']
13 uselib += ['JACK']
14 uselib += ['BLAS']
15
16 includes = ['../src', '.']
17
18 for target_name in ctx.path.ant_glob('src/**/*.c'):
19     extra_source = []
20     bld(features = 'c cprogram test',
21             lib = lib,
22             uselib = uselib,
23             source = [target_name] + extra_source,
24             target = str(target_name).split('.')[0],
25             includes = includes,
26             install_path = None,
27             defines = 'AUBIO_UNSTABLE_API=1',
28             cflags = ['-g'],
29             use = 'aubio')