Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r986131d r873646d  
    5151            help_str = 'compile with fftw3 instead of ooura',
    5252            help_disable_str = 'do not compile with fftw3')
    53     add_option_enable_disable(ctx, 'intelipp', default = None,
    54             help_str = 'use Intel IPP libraries (auto)',
    55             help_disable_str = 'do not use Intel IPP libraries')
    5653    add_option_enable_disable(ctx, 'complex', default = False,
    5754            help_str ='compile with C99 complex',
     
    106103
    107104def configure(ctx):
    108     from waflib import Options
    109     ctx.load('compiler_c')
    110     ctx.load('waf_unit_test')
    111     ctx.load('gnu_dirs')
    112 
    113105    target_platform = sys.platform
    114106    if ctx.options.target_platform:
    115107        target_platform = ctx.options.target_platform
    116108
     109    from waflib import Options
    117110
    118111    if target_platform=='emscripten':
    119         # need to force spaces between flag -o and path
    120         # inspired from :
    121         # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885)
    122         # (OSX /emscripten 1.37.9)
    123         ctx.env.CC_TGT_F            = ['-c', '-o', '']
    124         ctx.env.CCLNK_TGT_F         = ['-o', '']
     112        ctx.load('c_emscripten')
     113    else:
     114        ctx.load('compiler_c')
     115
     116    ctx.load('waf_unit_test')
     117    ctx.load('gnu_dirs')
     118
    125119    # check for common headers
    126120    ctx.check(header_name='stdlib.h')
     
    155149    else:
    156150        # enable debug symbols
    157         ctx.env.CFLAGS += ['/Z7', '/FS']
     151        ctx.env.CFLAGS += ['/Z7']
     152        # /FS flag available in msvc >= 12 (2013)
     153        if 'MSVC_VERSION' in ctx.env and ctx.env.MSVC_VERSION >= 12:
     154            ctx.env.CFLAGS += ['/FS']
    158155        ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO']
    159156        # configure warnings
    160157        ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS']
    161         # ignore "possible loss of data" warnings
    162         ctx.env.CFLAGS += ['/wd4305', '/wd4244', '/wd4245', '/wd4267']
    163         # ignore "unreferenced formal parameter" warnings
    164         ctx.env.CFLAGS += ['/wd4100']
    165158        # set optimization level and runtime libs
    166159        if (ctx.options.build_type == "release"):
     
    234227
    235228    if target_platform == 'emscripten':
    236         import os.path
    237         ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]
    238        
    239229        if ctx.options.build_type == "debug":
    240230            ctx.env.cshlib_PATTERN = '%s.js'
     
    257247        from python.lib.gen_external import get_c_declarations, get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, generate_lib_from_c_declarations
    258248        c_decls = get_c_declarations(usedouble=False)  # emscripten can't use double
    259         objects = get_cpp_objects_from_c_declarations(c_decls)
     249        objects = list(get_cpp_objects_from_c_declarations(c_decls))
    260250        # ensure that aubio structs are exported
    261251        objects += ['fvec_t', 'cvec_t', 'fmat_t']
     
    293283    else:
    294284        ctx.msg('Checking if complex.h is enabled', 'no')
    295    
    296     # check for Intel IPP
    297     if (ctx.options.enable_intelipp != False):
    298         if (ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'], mandatory = False) and
    299             ctx.check(lib=['ippcore', 'ippvm', 'ipps'], uselib_store='INTEL_IPP', mandatory = False)):
    300             ctx.msg('Checking if Intel IPP is available', 'yes')
    301             ctx.define('HAVE_INTEL_IPP', 1)
    302             if ctx.env.CC_NAME == 'msvc':
    303                 # force linking multi-threaded static IPP libraries on Windows with msvc
    304                 ctx.define('_IPP_SEQUENTIAL_STATIC', 1)
    305         else:
    306             ctx.msg('Checking if Intel IPP is available', 'no')
    307    
     285
    308286    # check for fftw3
    309287    if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False):
     
    329307        ctx.define('HAVE_FFTW3', 1)
    330308
    331     # fftw not enabled, use vDSP, intelIPP or ooura
     309    # fftw not enabled, use vDSP or ooura
    332310    if 'HAVE_FFTW3F' in ctx.env.define_key:
    333311        ctx.msg('Checking for FFT implementation', 'fftw3f')
     
    336314    elif 'HAVE_ACCELERATE' in ctx.env.define_key:
    337315        ctx.msg('Checking for FFT implementation', 'vDSP')
    338     elif 'HAVE_INTEL_IPP' in ctx.env.define_key:
    339         ctx.msg('Checking for FFT implementation', 'Intel IPP')
    340316    else:
    341317        ctx.msg('Checking for FFT implementation', 'ooura')
     
    468444    # add sub directories
    469445    if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']:
     446        if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd:
     447            bld.options.testcmd = 'node %s'
    470448        bld.recurse('examples')
    471449        bld.recurse('tests')
Note: See TracChangeset for help on using the changeset viewer.