-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.85 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.85 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
44
45
46
47
48
49
50
51
52
53
# Muzeï — Build Commands
# Requires: Node.js, Rust (via rustup), clang, lld, llvm, cargo-xwin
SHELL := /bin/bash
export PATH := $(HOME)/.cargo/bin:$(PATH)
export CC_x86_64_pc_windows_msvc := clang-cl
export CXX_x86_64_pc_windows_msvc := clang-cl
export AR_x86_64_pc_windows_msvc := llvm-lib
export CFLAGS_x86_64_pc_windows_msvc := --target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link \
-I$(HOME)/.cache/cargo-xwin/xwin/crt/include \
-I$(HOME)/.cache/cargo-xwin/xwin/sdk/include/ucrt \
-I$(HOME)/.cache/cargo-xwin/xwin/sdk/include/um \
-I$(HOME)/.cache/cargo-xwin/xwin/sdk/include/shared
TARGET := x86_64-pc-windows-msvc
RELEASE_DIR := src-tauri/target/$(TARGET)/release
.PHONY: help install dev build build-exe build-installer check lint format clean
help: ## Afficher cette aide
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Installer les dependances (npm + cargo)
npm install
rustup target add $(TARGET)
cargo install cargo-xwin
dev: ## Lancer en mode developpement (Linux, necessite un serveur X)
npx tauri dev
check: ## Verifier la compilation Rust
cargo check --manifest-path src-tauri/Cargo.toml
lint: ## Linter le code frontend
npm run lint
format: ## Formater le code
npm run format
build: build-installer ## Build complet (frontend + exe + installeur NSIS)
build-exe: ## Build le .exe Windows uniquement
npx tauri build --target $(TARGET)
@echo ""
@echo "==> EXE: $(RELEASE_DIR)/muzei.exe"
build-installer: build-exe ## Build le .exe + installeur NSIS
@echo "==> Installeur: $(RELEASE_DIR)/bundle/nsis/"
@ls -lh $(RELEASE_DIR)/bundle/nsis/*.exe 2>/dev/null || echo "(installeur non genere — makensis requis)"
clean: ## Nettoyer les artefacts de build
rm -rf dist/
cargo clean --manifest-path src-tauri/Cargo.toml