-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (45 loc) · 1.18 KB
/
Copy pathMakefile
File metadata and controls
58 lines (45 loc) · 1.18 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
54
55
56
57
58
.PHONY: run build build-release build-production release check test clippy fmt lint cic clean install
# run and compile
run:
cargo run --example brdf
build:
cargo build -p vulkan_engine --examples
build-release:
cargo build --release -p vulkan_engine --examples
build-production:
cargo build --profile production -p vulkan_engine --examples
ifeq ($(OS),Windows_NT)
package: build-production
powershell Copy-Item -Path "assets" -Destination "out\assets" -Recurse
powershell Copy-Item -Path "target\production\examples\*" -Destination "out" -Include "*.exe"
else
package: build-production
mkdir -p ./out/assets/
cp -R ./assets/* ./out/assets/
for f in $(shell ls crates/engine/examples); do cp target/production/examples/$$f out; done
endif
# test and lint
check:
cargo check --workspace --all-targets
test:
cargo test --workspace --all-targets
clippy:
cargo clippy --workspace --all-targets -- -D warnings
fmt:
cargo fmt --all -- --check
lint: fmt clippy
# utility
## can i commit?
cic: test lint
ifeq ($(OS),Windows_NT)
clean:
cargo clean
rd /s /q "./assets/shaders"
else
clean:
cargo clean
rm -r ./assets/shaders
endif
# installs binaries
install:
cargo install --path ./ve_asset