bd8a7da379
Each sub-project (gui, api, infra) now owns its own Makefile, and the root Makefile is a lean delegator for the base commands (run, build, test, clean, fmt). Odin source, deps, and web assets live under gui/ (gui/src, gui/lib, gui/www), with scripts kept under gui/scripts for build tooling only.
72 lines
2.4 KiB
Makefile
72 lines
2.4 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 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: ## Pull submodules + tidy Go deps
|
|
@git submodule update --init --recursive
|
|
@$(MAKE) -C $(INFRA) tidy
|
|
|
|
## ---- Renderer (Odin) -----------------------------------------------------
|
|
|
|
run: ## Run the native app (gui/)
|
|
@$(MAKE) -C $(GUI) run
|
|
|
|
build: ## Release build -> bin/desi_explorer (gui/)
|
|
@$(MAKE) -C $(GUI) build
|
|
|
|
build-debug: ## Debug build -> bin/desi_explorer (gui/)
|
|
@$(MAKE) -C $(GUI) build-debug
|
|
|
|
build-web: ## WebAssembly build -> build/web (gui/, needs emscripten)
|
|
@$(MAKE) -C $(GUI) build-web
|
|
|
|
## ---- 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
|