summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authororangerot <orangerot@orangerot.dev>2025-10-14 08:21:09 +0200
committerorangerot <orangerot@orangerot.dev>2025-10-14 08:21:09 +0200
commit1be303f6f6927165f1fb804b790763a95529baed (patch)
tree00ffaca6774054d0f27a3cb59e6b3078a4a0f9a8 /Makefile
parent2d359fb932c245267d3da8edbb479b549fc6cebb (diff)
feat: web export
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5d74d89..3f40477 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
CFLAGS := -Wall -Wextra
LDFLAGS = -lglfw -lm -lGL -I./glad/include
-domino-dungeon: main.c game.c game.h glad/src/glad.c assets/dominos.h
+SOURCES = main.c game.c game.h glad/src/glad.c assets/dominos.h
+
+domino-dungeon: ${SOURCES}
$(CC) ${CFLAGS} ${LDFLAGS} -o $@ $^
assets/dominos.h: src_build/domino_assets
@@ -10,3 +12,7 @@ assets/dominos.h: src_build/domino_assets
src_build/domino_assets: src_build/domino_assets.c
$(CC) -o $@ $^ -lm
+# https://gist.github.com/ousttrue/0f3a11d5d28e365b129fe08f18f4e141
+domino-dungeon.html: ${SOURCES}
+ emcc -sUSE_WEBGL2=1 -sUSE_GLFW=3 -sWASM=1 -I./glad/include $(filter %.c,$^) -o $@
+