This commit is contained in:
2026-08-09 14:13:13 -07:00
parent 58a2d5267e
commit b8b05954b1
2 changed files with 18 additions and 3 deletions
+18 -3
View File
@@ -1,4 +1,16 @@
.PHONY: shaders-vulkan shaders-d3d12 shaders-metal shaders-all bake toad hello_sprite crowd camera_sandbox clips check test help
.PHONY: flame flame-build flame-record flame-svg flame-report flame-tools
# Flamegraph profiling (needs: pacman -S perf). Example: make flame or make flame FLAME_EXAMPLE=toad
FLAME_EXAMPLE ?= crowd
FLAME_BIN := $(FLAME_EXAMPLE)_perf
FLAMEGRAPH_DIR ?= tools/FlameGraph
FLAME_OUT_DIR ?= flame
# One stamp per `make` invocation so svg/jpg/report share a name.
ifndef FLAME_STAMP
FLAME_STAMP := $(shell date +%Y%m%d-%H%M%S)
endif
FLAME_PREFIX := $(FLAME_OUT_DIR)/$(FLAME_EXAMPLE)-$(FLAME_STAMP)
help:
@echo "Targets:"
@@ -14,6 +26,11 @@ help:
@echo " crowd Many sprites, one Character_Data"
@echo " camera_sandbox Pan camera / Space toggles follow"
@echo " clips Keys 1/2 switch idle/walk"
@echo " flame Build+record+SVG+JPG+text report (FLAME_EXAMPLE=$(FLAME_EXAMPLE))"
@echo " flame-build Optimized debug binary ($(FLAME_BIN))"
@echo " flame-record perf record (play, then quit)"
@echo " flame-svg Convert perf.data -> $(FLAME_PREFIX).svg/.jpg"
@echo " flame-report Convert perf.data -> $(FLAME_PREFIX)-report.txt"
bake:
./scripts/bake_all.sh
@@ -31,6 +48,7 @@ shaders-all: shaders-vulkan shaders-d3d12 shaders-metal
test:
odin test engine
odin test assetbake
check:
odin check examples/toad -collection:pkg=.
@@ -53,8 +71,6 @@ camera_sandbox:
clips:
odin run examples/clips -collection:pkg=.
<<<<<<< Updated upstream
=======
flame-tools:
@if [ ! -x "$(FLAMEGRAPH_DIR)/stackcollapse-perf.pl" ] || [ ! -x "$(FLAMEGRAPH_DIR)/flamegraph.pl" ]; then \
@@ -85,4 +101,3 @@ flame-report:
flame: flame-record flame-svg flame-report
@echo "Artifacts: $(FLAME_PREFIX).{svg,jpg} $(FLAME_PREFIX)-report.txt"
>>>>>>> Stashed changes
BIN
View File
Binary file not shown.