-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 995 Bytes
/
Makefile
File metadata and controls
49 lines (39 loc) · 995 Bytes
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
# ================================================
# 🦀 Windows-kompatibles Makefile für TreeScanner
# ================================================
PROJECT_NAME := treescanner
BUILD_DIR := target/release
OUT_DIR := bin
MSVCPATH := "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
# Standardziel
.PHONY: all
all: build copy
# MSCV Starten
msvc:
$(MSVCPATH)
# Release-Build
.PHONY: build
build:
cargo build --release
# Kopiere EXE in bin\
.PHONY: copy
copy:
if not exist "$(OUT_DIR)" mkdir "$(OUT_DIR)"
copy /Y "$(BUILD_DIR)\$(PROJECT_NAME).exe" "$(OUT_DIR)\$(PROJECT_NAME).exe"
# Lösche alles außer bin\
.PHONY: clean
clean:
cargo clean
# Tests
.PHONY: test
test:
cargo test
# Lokale Installation
.PHONY: install
install:
cargo install --path . --root install-local
# Vollständiger Reset
.PHONY: reset
reset: clean
if exist "$(OUT_DIR)" rmdir /S /Q "$(OUT_DIR)"
if exist "install-local" rmdir /S /Q "install-local"