Add Emscripten support

This commit is contained in:
Joshua Granick
2015-02-12 19:04:40 -08:00
parent 623547bbf5
commit 62194c7842
10 changed files with 145 additions and 70 deletions

View File

@@ -9,33 +9,35 @@
extern "C" const char *hxRunLibrary();
extern "C" void hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
extern "C" int ::name::_register_prims();
::end::
::end::
extern "C" int main(int argc, char *argv[])
{
//printf("Starting ...\n" );
hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
::name::_register_prims();
::end::
::end::
extern "C" int zlib_register_prims();
::foreach ndlls::::if (registerStatics)::extern "C" int ::name::_register_prims();::end::
::end::
extern "C" int main(int argc, char *argv[]) {
//printf("Starting ...\n" );
hxcpp_set_top_of_stack ();
zlib_register_prims ();
::foreach ndlls::::if (registerStatics)::::name::_register_prims();::end::
::end::
//printf("Running\n");
const char *err = NULL;
err = hxRunLibrary();
err = hxRunLibrary ();
if (err) {
printf(" Error %s\n", err );
return -1;
}
//printf("Done!\n");
return 0;
}
}