source: src/wscript_build @ 4b33381

Last change on this file since 4b33381 was 05ed7f5, checked in by Paul Brossier <piem@piem.org>, 4 years ago

Merge branch 'feature/timestretch'

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