-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 903 Bytes
/
Makefile
File metadata and controls
44 lines (32 loc) · 903 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
# Define the main executable name (adjust as needed)
TARGET = virtual_machine
# Default target: builds the release version
all: build-release
cli:
cargo run --bin cli
trace:
RUST_LOG=$(TARGET)=trace cargo run --bin cli
info:
RUST_LOG=$(TARGET)=info cargo run --bin cli
debug:
RUST_LOG=$(TARGET)=debug cargo run --bin cli
# Target to build the debug version
build-debug:
cargo build
# Target to build the release version
build-release:
cargo build --release
# Target to run tests
test:
cargo test
# Target to clean the project
clean:
cargo clean
# Target to run the application (debug version)
run-debug: build-debug
./target/debug/$(TARGET)
# Target to run the application (release version)
run-release: build-release
./target/release/$(TARGET)
# Phony targets to prevent conflicts with files of the same name
.PHONY: all build-debug build-release test clean run-debug run-release