domino-dungeon/Makefile

20 lines
653 B
Makefile
Raw Normal View History

2025-10-14 14:48:54 +02:00
CFLAGS := -ggdb -Wall -Wextra
# -fsanitize=address
2025-10-13 21:07:46 +02:00
LDFLAGS = -lglfw -lm -lGL -I./glad/include
2025-10-14 21:39:22 +02:00
SOURCES = main.c game.c game.h glad/src/glad.c assets/white_and_blue_dominoes.h assets/red_and_peach_dominoes.h domino.c domino.h
2025-10-14 08:21:09 +02:00
domino-dungeon: ${SOURCES}
2025-10-15 17:16:50 +02:00
$(CC) ${CFLAGS} -o $@ $^ ${LDFLAGS}
2025-10-13 21:07:46 +02:00
2025-10-14 21:39:22 +02:00
assets/%.h: src_build/domino_assets
$< assets/1bit_dominoes_asset_pack/$*.png $* > $@
2025-10-14 06:17:32 +02:00
src_build/domino_assets: src_build/domino_assets.c
$(CC) -o $@ $^ -lm
2025-10-14 08:21:09 +02:00
# https://gist.github.com/ousttrue/0f3a11d5d28e365b129fe08f18f4e141
2025-10-15 17:16:50 +02:00
index.html: ${SOURCES}
emcc -sUSE_WEBGL2=1 -sUSE_GLFW=3 -sWASM=1 --shell-file=minshell.html -I./glad/include $(filter %.c,$^) -o $@
2025-10-14 08:21:09 +02:00