- Timestamp:
- May 30, 2017, 5:22:26 PM (8 years ago)
- 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:
- 6421221
- Parents:
- dad51ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wscript
rdad51ce r4b084a9 238 238 ctx.env.LINKFLAGS += ['-Oz'] 239 239 ctx.env.cshlib_PATTERN = '%s.min.js' 240 241 # import exposed function names 242 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 243 c_decls = get_c_declarations(usedouble=False) #emscripten can't use double 244 objects = get_cpp_objects_from_c_declarations(c_decls) 245 objects+=['fvec_t'] 246 lib = generate_lib_from_c_declarations(objects,c_decls) 247 exported_funcnames = get_all_func_names_from_lib(lib) 248 c_mangled_names = ['_'+s for s in exported_funcnames] 249 ctx.env.LINKFLAGS_cshlib += ['-s','EXPORTED_FUNCTIONS=%s'%c_mangled_names] 250 # put memory file inside generated js files 251 ctx.env.LINKFLAGS+=['--memory-init-file','0'] 240 241 # lib doesnt ship file system support 242 ctx.env.LINKFLAGS_cshlib += ['-s', 'NO_FILESYSTEM=1'] 243 # put memory file inside generated js files for easier portability 244 ctx.env.LINKFLAGS += ['--memory-init-file', '0'] 252 245 ctx.env.cprogram_PATTERN = "%s.js" 253 246 ctx.env.cstlib_PATTERN = '%s.a' 254 if (ctx.options.enable_atlas != True): 255 ctx.options.enable_atlas = False 247 248 # get exposed functions 249 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 250 c_decls = get_c_declarations(usedouble=False) # emscripten can't use double 251 objects = get_cpp_objects_from_c_declarations(c_decls) 252 # ensure that aubio structs are exported 253 objects += ['fvec_t', 'cvec_t', 'fmat_t'] 254 lib = generate_lib_from_c_declarations(objects, c_decls) 255 exported_funcnames = get_all_func_names_from_lib(lib) 256 c_mangled_names = ['_' + s for s in exported_funcnames] 257 ctx.env.LINKFLAGS_cshlib += ['-s', 'EXPORTED_FUNCTIONS=%s' % c_mangled_names] 258 259 if (ctx.options.enable_atlas != True): 260 ctx.options.enable_atlas = False 256 261 257 262 # check support for C99 __VA_ARGS__ macros
Note: See TracChangeset
for help on using the changeset viewer.