From: Martin Hermant Date: Mon, 29 May 2017 22:30:33 +0000 (-0400) Subject: wscript : use gen_external code to generate flags passed to emscripten X-Git-Tag: 0.4.6~52^2~11 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=40792b2ef7f967e07626b22f6f120397a5f76317;p=aubio.git wscript : use gen_external code to generate flags passed to emscripten --- diff --git a/wscript b/wscript index 05b3b0ac..2952cbf2 100644 --- a/wscript +++ b/wscript @@ -238,6 +238,15 @@ def configure(ctx): ctx.env.LINKFLAGS += ['-Oz'] ctx.env.cshlib_PATTERN = '%s.min.js' + # import exposed function names + 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 + c_decls = get_c_declarations(usedouble=False) #emscripten can't use double + objects = get_cpp_objects_from_c_declarations(c_decls) + objects+=['fvec'] + lib = generate_lib_from_c_declarations(objects,c_decls) + exported_funcnames = get_all_func_names_from_lib(lib) + c_mangled_names = ['_'+s for s in exported_funcnames] + ctx.env.LINKFLAGS_cshlib += ['-s','EXPORTED_FUNCTIONS=%s'%c_mangled_names] ctx.env.cprogram_PATTERN = "%s.js" if (ctx.options.enable_atlas != True): ctx.options.enable_atlas = False