source: src/wscript_build @ 5154024

feature/crepe_org
Last change on this file since 5154024 was 747d050, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[wscript] link against hdf5 library

  • 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 += ['BLAS']
15uselib += ['HDF5', 'HDF5_HL']
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.