source: src/wscript_build @ bf6df1c

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since bf6df1c was 8f343e6, checked in by Martin Hermant <martin.hermant@gmail.com>, 8 years ago

src/wscript_build : add cshlib pass for generating aubio.js or aubio.min.js

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[0e355f6]1# vim:set syntax=python:
2
[eae5898]3uselib = []
[ccc55bd]4uselib += ['M']
[0318cc1]5uselib += ['FFTW3', 'FFTW3F']
6uselib += ['SAMPLERATE']
7uselib += ['SNDFILE']
[ba0ba10]8uselib += ['AVCODEC']
9uselib += ['AVFORMAT']
[cd133ba]10uselib += ['SWRESAMPLE']
[ba0ba10]11uselib += ['AVRESAMPLE']
12uselib += ['AVUTIL']
[f0ce36a1]13uselib += ['BLAS']
[eae5898]14
[dc0e759]15source = ctx.path.ant_glob('*.c **/*.c')
[ccc55bd]16
[985a5d1]17ctx(features = 'c',
[dc0e759]18        source = source,
19        includes = ['.'],
[ccc55bd]20        use = uselib,
[dc0e759]21        target = 'lib_objects')
[afbd7e7]22
[985a5d1]23# build libaubio.so (cshlib) and/or libaubio.a (cstlib)
[19ddbf3]24if ctx.env['DEST_OS'] in ['ios', 'iosimulator']:
[a90e9d4]25    build_features = ['cstlib', 'cshlib']
[06dba46]26elif ctx.env['DEST_OS'] in ['win32', 'win64']:
[25e2001]27    build_features = ['cstlib', 'cshlib']
[fb5838a]28elif ctx.env['DEST_OS'] in ['emscripten']:
[8f343e6]29    build_features = ['cstlib','cshlib']
[0ec7113]30elif '--static' in ctx.env['LDFLAGS'] or '--static' in ctx.env['LINKFLAGS']:
31    # static in cflags, ...
32    build_features = ['cstlib']
33else:
34    # linux, darwin, android, mingw, ...
[3bf80b9]35    build_features = ['cstlib', 'cshlib']
[b712146]36
[8698499]37# also install static lib
38from waflib.Tools.c import cstlib
39from waflib.Tools.fc import fcstlib
40fcstlib.inst_to = cstlib.inst_to = '${LIBDIR}'
41
[7fd1831]42for target in build_features:
[dc0e759]43    ctx(features = 'c ' + target,
[ccc55bd]44            use = uselib + ['lib_objects'],
[dc0e759]45            target = 'aubio',
46            vnum = ctx.env['LIB_VERSION'])
[000b090]47
48# install headers, except _priv.h ones
[0ec7113]49ctx.install_files('${INCLUDEDIR}/aubio/',
[dc0e759]50        ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']),
51        relative_trick=True)
Note: See TracBrowser for help on using the repository browser.