aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-06 16:51:36 +1000
committerquou <quou@disroot.org>2023-05-06 16:51:36 +1000
commit4629675329f872c9dd4672402b9b9e5e593fec19 (patch)
treec2e42b6cd93d4b96ebea23177b2dfee3eeaed9ec /Makefile
parentec51d32ea0a30c138e690f637f38d83c086e02b9 (diff)
Building and running for emscripten.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 25e0cec..b840482 100644
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,13 @@ pack_assets:
$(compiler) -O3 -Wall pack.c -o packer
$(pack_cmd) $(assets)
+emscripten: $(target)
+ mkdir -p ems/out
+ emcc $(sources) -o ems/out/mallocbullet.html \
+ --embed-file pack -Dplat_sdl2 -Dplat_emscripten -sUSE_SDL=2 \
+ -sTOTAL_MEMORY=67108864 --shell-file ems/template.html \
+ --post-js ems/post_run.js
+
-include $(objects:%.o=%.d)
$(target): $(objects) assets pack_assets