From 1be303f6f6927165f1fb804b790763a95529baed Mon Sep 17 00:00:00 2001 From: orangerot Date: Tue, 14 Oct 2025 08:21:09 +0200 Subject: feat: web export --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 $@ + -- cgit v1.2.3