Changeset 9fabad5


Ignore:
Timestamp:
Sep 6, 2017, 6:03:33 PM (7 years ago)
Author:
Martin Hermant <martin.hermant@gmail.com>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
23facac
Parents:
965adee
Message:

wscript :

  • use waf/extra/c_emscripten
  • use node to test js files

add get_waf_emscripten to setup waf with emscripten

Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r965adee r9fabad5  
    103103
    104104def configure(ctx):
    105     from waflib import Options
    106     ctx.load('compiler_c')
    107     ctx.load('waf_unit_test')
    108     ctx.load('gnu_dirs')
    109 
    110105    target_platform = sys.platform
    111106    if ctx.options.target_platform:
    112107        target_platform = ctx.options.target_platform
    113 
     108   
     109    from waflib import Options
    114110
    115111    if target_platform=='emscripten':
    116         # need to force spaces between flag -o and path
    117         # inspired from :
    118         # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885)
    119         # (OSX /emscripten 1.37.9)
    120         ctx.env.CC_TGT_F            = ['-c', '-o', '']
    121         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   
     119   
     120   
    122121    # check for common headers
    123122    ctx.check(header_name='stdlib.h')
     
    227226
    228227    if target_platform == 'emscripten':
    229         import os.path
    230         ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]
    231        
    232228        if ctx.options.build_type == "debug":
    233229            ctx.env.cshlib_PATTERN = '%s.js'
     
    444440    # main source
    445441    bld.recurse('src')
    446 
     442   
    447443    # add sub directories
    448444    if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']:
     445        if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd:
     446            bld.options.testcmd = 'node %s'
    449447        bld.recurse('examples')
    450448        bld.recurse('tests')
Note: See TracChangeset for help on using the changeset viewer.