mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 01:08:15 +01:00
[build] Add a flag MODULARIZE when building with
emscripten toolchain
This commit is contained in:
committed by
EmilieNumworks
parent
959f498c2d
commit
af877c19bb
@@ -49,5 +49,7 @@ ifeq ($(DEBUG),1)
|
||||
EMFLAGS += --profiling-funcs -s ASSERTIONS=1
|
||||
endif
|
||||
|
||||
EMFLAGS += -s MODULARIZE=1 -s 'EXPORT_NAME="Epsilon"'
|
||||
|
||||
SFLAGS += $(EMFLAGS)
|
||||
LDFLAGS += $(EMFLAGS) -Oz -s EXPORTED_FUNCTIONS='["_main", "_IonEventsEmscriptenPushKey", "_IonEventsEmscriptenPushEvent"]'
|
||||
|
||||
@@ -183,21 +183,14 @@
|
||||
<div>
|
||||
<a id="screenshot" href="#" target="_blank" download>Save screenshot</a>
|
||||
</div>
|
||||
<script src="epsilon.js"></script>
|
||||
<script>
|
||||
var Module = {
|
||||
arguments: ["fr"],
|
||||
preRun: [],
|
||||
postRun: [],
|
||||
print: function(text) {
|
||||
console.log(text);
|
||||
},
|
||||
printErr: function(text) {
|
||||
console.error(text);
|
||||
},
|
||||
arguments: ["--language", "fr"],
|
||||
canvas: document.getElementById("screen")
|
||||
};
|
||||
Epsilon(Module);
|
||||
</script>
|
||||
<script src="epsilon.js"></script>
|
||||
<script>
|
||||
var buttons = document.querySelectorAll(".calculator .keyboard a");
|
||||
for (var i=0; i< buttons.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user