source: src/wscript_build @ 9956027

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since 9956027 was cd133ba, checked in by Paul Brossier <piem@piem.org>, 8 years ago

src/wscript_build: also link against libswresample if needed

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