Files
desi_explorer/Makefile
sam_oneal 9e6cb03b8a
CI / Detect changed paths (pull_request) Failing after 1s
CI / Infra unit tests, vet, and preview (pull_request) Has been skipped
CI / Odin unit tests and build (pull_request) Has been skipped
CI / API unit tests and lint (pull_request) Has been skipped
updated makefiles and added dependency installation for ODIN
2026-09-02 11:37:29 -06:00

85 lines
2.8 KiB
Makefile

# DESI Explorer — root Makefile
#
# Lean orchestrator: the "base" commands (`run`, `build`, `test`, ...) delegate
# into the per-project Makefiles in `gui/`, `api/`, and `infra/`. Project-
# specific commands live in those directories and are reached with
# `make -C <dir> <target>` (or the thin passthrough targets below).
GUI := gui
API := api
INFRA := infra
.PHONY: help setup run run-web build build-debug build-web test clean fmt \
renovate-validate
help: ## List available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Sub-project targets:"
@echo " \033[36mmake -C gui help\033[0m Odin renderer (run, build, build-web, test, fmt, ...)"
@echo " \033[36mmake -C api help\033[0m Rust API (run, build, test, check, fmt, ...)"
@echo " \033[36mmake -C infra help\033[0m Infra (preview, up, down, refresh, test, ...)"
## ---- Setup ---------------------------------------------------------------
setup: ## Setup all sub-projects (submodules, gui deps, api deps, infra deps)
@git submodule update --init --recursive
@$(MAKE) -C $(GUI) setup
@$(MAKE) -C $(API) setup
@$(MAKE) -C $(INFRA) tidy
## ---- Renderer (Odin) -----------------------------------------------------
run: ## Run the native app (gui/)
@$(MAKE) -C $(API) run & api_pid=$$!; \
trap 'kill $$api_pid 2>/dev/null' INT TERM EXIT; \
$(MAKE) -C $(GUI) run; \
kill $$api_pid 2>/dev/null
build: ## Release build (gui/ + api/)
@$(MAKE) -C $(GUI) build
@$(MAKE) -C $(API) build
build-debug: ## Debug build (gui/ + api/)
@$(MAKE) -C $(GUI) build-debug
@$(MAKE) -C $(API) build
build-web: ## WebAssembly build -> build/web (gui/, needs emscripten)
@$(MAKE) -C $(GUI) build-web
run-web: ## Start WASM build + API server for web dev
@$(MAKE) -C $(API) run & api_pid=$$!; \
trap 'kill $$api_pid 2>/dev/null' INT TERM EXIT; \
$(MAKE) -C $(GUI) build-web; \
kill $$api_pid 2>/dev/null
## ---- Aggregates ----------------------------------------------------------
test: ## Test all projects (odin + cargo + go)
@$(MAKE) -C $(GUI) test
@$(MAKE) -C $(API) test
@$(MAKE) -C $(INFRA) test
clean: ## Remove build artifacts from all projects
@$(MAKE) -C $(GUI) clean
@$(MAKE) -C $(API) clean
@$(MAKE) -C $(INFRA) clean
fmt: ## Format all projects (odin + rust)
@$(MAKE) -C $(GUI) fmt
@$(MAKE) -C $(API) fmt
## ---- Passthrough to sub-project Makefiles --------------------------------
api-%: ## Forward a target to the api/ Makefile
@$(MAKE) -C $(API) $*
infra-%: ## Forward a target to the infra/ Makefile
@$(MAKE) -C $(INFRA) $*
## ---- Tooling -------------------------------------------------------------
renovate-validate: ## Validate renovate.json
bunx --package renovate renovate-config-validator renovate.json --strict