source: src/wscript_build @ 4c37e87

feature/autosinkfeature/cnnfeature/crepefix/ffmpeg5
Last change on this file since 4c37e87 was 3efb631, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[waf] add vorbisenc detection

  • Property mode set to 100644
File size: 1.5 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 += ['BLAS']
16
17source = ctx.path.ant_glob('*.c **/*.c')
18
19ctx(features = 'c',
20        source = source,
21        includes = ['.'],
22        use = uselib,
23        target = 'lib_objects')
24
25# build libaubio.so (cshlib) and/or libaubio.a (cstlib)
26if ctx.env['DEST_OS'] in ['ios', 'iosimulator']:
27    build_features = ['cstlib', 'cshlib']
28elif ctx.env['DEST_OS'] in ['win32', 'win64']:
29    build_features = ['cstlib', 'cshlib gensyms']
30elif ctx.env['DEST_OS'] in ['emscripten']:
31    build_features = ['cstlib','cshlib']
32elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']:
33    # static in cflags, ...
34    build_features = ['cstlib']
35else:
36    # linux, darwin, android, mingw, ...
37    build_features = ['cstlib', 'cshlib']
38
39# also install static lib
40from waflib.Tools.c import cstlib
41cstlib.inst_to = '${LIBDIR}'
42
43for target in build_features:
44    ctx(features = 'c ' + target,
45            use = uselib + ['lib_objects'],
46            target = 'aubio',
47            export_symbols_regex=r'(?:.*aubio|fvec|lvec|cvec|fmat|new|del)_.*',
48            vnum = ctx.env['LIB_VERSION'])
49
50# install headers, except _priv.h ones
51ctx.install_files('${INCLUDEDIR}/aubio/',
52        ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']),
53        relative_trick=True)
Note: See TracBrowser for help on using the repository browser.