source: src/wscript_build @ 1ba359c

feature/autosink
Last change on this file since 1ba359c was 1ba359c, checked in by Paul Brossier <piem@piem.org>, 18 months ago

[waf] add flac detection

  • Property mode set to 100644
File size: 1.6 KB
Line 
1# vim:set syntax=python:
2
3uselib = []
4uselib += ['M']
5uselib += ['FFTW3', 'FFTW3F']
6uselib += ['INTEL_IPP']
7uselib += ['SAMPLERATE']
8uselib += ['SNDFILE']
9uselib += ['AVCODEC']
10uselib += ['AVFORMAT']
11uselib += ['SWRESAMPLE']
12uselib += ['AVRESAMPLE']
13uselib += ['AVUTIL']
14uselib += ['VORBISENC']
15uselib += ['FLAC']
16uselib += ['BLAS']
17
18source = ctx.path.ant_glob('*.c **/*.c')
19
20ctx(features = 'c',
21        source = source,
22        includes = ['.'],
23        use = uselib,
24        target = 'lib_objects')
25
26# build libaubio.so (cshlib) and/or libaubio.a (cstlib)
27if ctx.env['DEST_OS'] in ['ios', 'iosimulator']:
28    build_features = ['cstlib', 'cshlib']
29elif ctx.env['DEST_OS'] in ['win32', 'win64']:
30    build_features = ['cstlib', 'cshlib gensyms']
31elif ctx.env['DEST_OS'] in ['emscripten']:
32    build_features = ['cstlib','cshlib']
33elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']:
34    # static in cflags, ...
35    build_features = ['cstlib']
36else:
37    # linux, darwin, android, mingw, ...
38    build_features = ['cstlib', 'cshlib']
39
40# also install static lib
41from waflib.Tools.c import cstlib
42cstlib.inst_to = '${LIBDIR}'
43
44for target in build_features:
45    ctx(features = 'c ' + target,
46            use = uselib + ['lib_objects'],
47            target = 'aubio',
48            export_symbols_regex=r'(?:.*aubio|fvec|lvec|cvec|fmat|new|del)_.*',
49            vnum = ctx.env['LIB_VERSION'])
50
51# install headers, except _priv.h ones
52ctx.install_files('${INCLUDEDIR}/aubio/',
53        ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']),
54        relative_trick=True)
Note: See TracBrowser for help on using the repository browser.