-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (29 loc) · 1.25 KB
/
Copy pathMakefile
File metadata and controls
43 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
APP_DIR := cmd/x6configurator
FRONTEND_DIR := frontend
BIN_DIR := bin
WAILS := wails3
.DEFAULT_GOAL := help
.PHONY: help install-deps frontend-install frontend-build frontend-test go-test vet test build dev check clean
help: ## Show available targets
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z0-9_-]+:.*##/ {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install-deps: ## Install native Ubuntu/Debian dependencies required by Wails
sudo apt-get update
sudo apt-get install -y --no-install-recommends libgtk-4-dev libwebkitgtk-6.0-dev
frontend-install: ## Install frontend dependencies deterministically
cd $(FRONTEND_DIR) && npm ci
frontend-build: frontend-install ## Build frontend assets
cd $(FRONTEND_DIR) && npm run build
frontend-test: ## Run frontend tests
cd $(FRONTEND_DIR) && npm test
go-test: frontend-build ## Run Go tests
go test ./...
vet: frontend-build ## Run Go vet
go vet ./...
test: go-test frontend-test ## Run Go and frontend tests
build: frontend-build ## Build the Wails desktop application
cd $(APP_DIR) && $(WAILS) build
dev: ## Start the Wails development application
cd $(APP_DIR) && $(WAILS) dev
check: vet test build ## Run vet, tests, and the Wails build
clean: ## Remove ignored build output
rm -rf $(BIN_DIR)