source: src/wscript_build @ 5bc1477

feature/crepe
Last change on this file since 5bc1477 was 5bc1477, checked in by Paul Brossier <piem@piem.org>, 2 years ago

[wscript] link against hdf5 library

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