additional changes
CI / Detect changed paths (pull_request) Successful in 21s
CI / Odin unit tests and build (pull_request) Successful in 45s
CI / API unit tests and lint (pull_request) Failing after 28s
CI / Infra unit tests, vet, and preview (pull_request) Successful in 43s

This commit is contained in:
2026-09-07 19:51:22 -06:00
parent 1443369f6c
commit fade4a17dc
8 changed files with 103 additions and 82 deletions
+19 -1
View File
@@ -8,13 +8,28 @@
# output dirs live at the repo root and are referenced through `$(ROOT)`.
ODIN ?= odin
GDB ?= gdb
ROOT := ..
BIN := $(ROOT)/bin
BINARY := $(BIN)/desi_explorer
ODIN_FLAGS := -collection:lib=lib/local
WASM_DEFINE := RAYLIB_WASM_LIB=env.o
.PHONY: help setup add-dep run build build-debug build-web test clean fmt
# Normalize GUI_ENV_FILE (given relative to the repo root) to an absolute path
# so the Odin process can open it regardless of its working directory.
# "override" is required because GUI_ENV_FILE is usually set on the command
# line (or passed as an env var to this sub-make), which would otherwise
# override any assignment made here.
ifdef GUI_ENV_FILE
ifneq ($(abspath $(GUI_ENV_FILE)),$(GUI_ENV_FILE))
override GUI_ENV_FILE := $(abspath $(ROOT)/$(GUI_ENV_FILE))
endif
endif
# "override" on a command-line variable silently drops it from the recipe
# environment; re-export it so the app can find its env file (run + gdb).
export GUI_ENV_FILE
.PHONY: help setup add-dep run build build-debug gdb build-web test clean fmt
help: ## List available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
@@ -41,6 +56,9 @@ build-debug: ## Debug build -> bin/desi_explorer
@mkdir -p lib/local $(BIN)
$(ODIN) build src $(ODIN_FLAGS) -o:none -debug -out:$(BINARY)
gdb: build-debug ## Run the native app under gdb (type 'run', then 'bt' on a crash)
$(GDB) -q --args $(BINARY) $(ARGS)
build-web: ## WebAssembly build -> build/web (needs emscripten)
@scripts/build_web.sh