[0e355f6] | 1 | # vim:set syntax=python: |
---|
| 2 | |
---|
[eae5898] | 3 | uselib = [] |
---|
[ccc55bd] | 4 | uselib += ['M'] |
---|
[0318cc1] | 5 | uselib += ['FFTW3', 'FFTW3F'] |
---|
[379ef6c] | 6 | uselib += ['INTEL_IPP'] |
---|
[0318cc1] | 7 | uselib += ['SAMPLERATE'] |
---|
| 8 | uselib += ['SNDFILE'] |
---|
[0015a54] | 9 | uselib += ['RUBBERBAND'] |
---|
[ba0ba10] | 10 | uselib += ['AVCODEC'] |
---|
| 11 | uselib += ['AVFORMAT'] |
---|
[cd133ba] | 12 | uselib += ['SWRESAMPLE'] |
---|
[ba0ba10] | 13 | uselib += ['AVRESAMPLE'] |
---|
| 14 | uselib += ['AVUTIL'] |
---|
[3efb631] | 15 | uselib += ['VORBISENC'] |
---|
[1ba359c] | 16 | uselib += ['FLAC'] |
---|
[f0ce36a1] | 17 | uselib += ['BLAS'] |
---|
[5bc1477] | 18 | uselib += ['HDF5', 'HDF5_HL'] |
---|
[eae5898] | 19 | |
---|
[dc0e759] | 20 | source = ctx.path.ant_glob('*.c **/*.c') |
---|
[ccc55bd] | 21 | |
---|
[985a5d1] | 22 | ctx(features = 'c', |
---|
[dc0e759] | 23 | source = source, |
---|
| 24 | includes = ['.'], |
---|
[ccc55bd] | 25 | use = uselib, |
---|
[dc0e759] | 26 | target = 'lib_objects') |
---|
[afbd7e7] | 27 | |
---|
[985a5d1] | 28 | # build libaubio.so (cshlib) and/or libaubio.a (cstlib) |
---|
[19ddbf3] | 29 | if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: |
---|
[a90e9d4] | 30 | build_features = ['cstlib', 'cshlib'] |
---|
[06dba46] | 31 | elif ctx.env['DEST_OS'] in ['win32', 'win64']: |
---|
[f2f9d8b] | 32 | build_features = ['cstlib', 'cshlib gensyms'] |
---|
[fb5838a] | 33 | elif ctx.env['DEST_OS'] in ['emscripten']: |
---|
[8f343e6] | 34 | build_features = ['cstlib','cshlib'] |
---|
[0ec7113] | 35 | elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']: |
---|
| 36 | # static in cflags, ... |
---|
| 37 | build_features = ['cstlib'] |
---|
| 38 | else: |
---|
| 39 | # linux, darwin, android, mingw, ... |
---|
[3bf80b9] | 40 | build_features = ['cstlib', 'cshlib'] |
---|
[b712146] | 41 | |
---|
[8698499] | 42 | # also install static lib |
---|
| 43 | from waflib.Tools.c import cstlib |
---|
[18ec142] | 44 | cstlib.inst_to = '${LIBDIR}' |
---|
[f2f9d8b] | 45 | |
---|
[7fd1831] | 46 | for target in build_features: |
---|
[dc0e759] | 47 | ctx(features = 'c ' + target, |
---|
[ccc55bd] | 48 | use = uselib + ['lib_objects'], |
---|
[dc0e759] | 49 | target = 'aubio', |
---|
[8774047] | 50 | export_symbols_regex=r'(?:.*aubio|fvec|lvec|cvec|fmat|new|del)_.*', |
---|
[dc0e759] | 51 | vnum = ctx.env['LIB_VERSION']) |
---|
[000b090] | 52 | |
---|
| 53 | # install headers, except _priv.h ones |
---|
[0ec7113] | 54 | ctx.install_files('${INCLUDEDIR}/aubio/', |
---|
[dc0e759] | 55 | ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']), |
---|
| 56 | relative_trick=True) |
---|