domino-dungeon/Makefile
2025-10-18 17:32:37 +02:00

27 lines
720 B
Makefile

CC = gcc
CFLAGS := -ggdb -Wall -Wextra
# -fsanitize=address
LDFLAGS = -lglfw -lm -lGL -I./glad/include
SOURCES = main.c \
game.c game.h \
domino.c domino.h \
draw.c draw.h \
assets/white_and_blue_dominoes.h \
assets/red_and_peach_dominoes.h \
glad/src/glad.c \
domino-dungeon: ${SOURCES}
$(CC) ${CFLAGS} -o $@ $^ ${LDFLAGS}
assets/%.h: src_build/domino_assets
$< assets/1bit_dominoes_asset_pack/$*.png $* > $@
src_build/domino_assets: src_build/domino_assets.c
$(CC) -o $@ $^ -lm
# https://gist.github.com/ousttrue/0f3a11d5d28e365b129fe08f18f4e141
index.html: ${SOURCES}
emcc -sUSE_WEBGL2=1 -sUSE_GLFW=3 -sWASM=1 --shell-file=minshell.html -I./glad/include $(filter %.c,$^) -o $@