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