source: src/wscript_build @ bad88364

sampler
Last change on this file since bad88364 was bad88364, checked in by Paul Brossier <piem@piem.org>, 3 years ago

Merge branch 'master' into sampler

  • Property mode set to 100644
File size: 1.5 KB
Line 
1# vim:set syntax=python:
2
3uselib = []
4uselib += ['M']
5uselib += ['FFTW3', 'FFTW3F']
6uselib += ['SAMPLERATE']
7uselib += ['SNDFILE']
8uselib += ['RUBBERBAND']
9uselib += ['AVCODEC']
10uselib += ['AVFORMAT']
11uselib += ['SWRESAMPLE']
12uselib += ['AVRESAMPLE']
13uselib += ['AVUTIL']
14uselib += ['BLAS']
15uselib += ['PTHREAD']
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']
30elif ctx.env['DEST_OS'] in ['emscripten']:
31    build_features = ['cstlib']
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
41from waflib.Tools.fc import fcstlib
42fcstlib.inst_to = cstlib.inst_to = '${LIBDIR}'
43
44for target in build_features:
45    ctx(features = 'c ' + target,
46            use = uselib + ['lib_objects'],
47            target = 'aubio',
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.