xref: /DragonOS/user/apps/test-blockcache/Makefile (revision 7c28051e8c601312d3d0fd7bcb71bc71450d10c0)
1eb49bb99S曾俊# The toolchain we use.
2eb49bb99S曾俊# You can get it by running DragonOS' `tools/bootstrap.sh`
3*7c28051eSlinfengTOOLCHAIN="+nightly-2024-11-05-x86_64-unknown-linux-gnu"
4eb49bb99S曾俊RUSTFLAGS+="-C target-feature=+crt-static -C link-arg=-no-pie"
5eb49bb99S曾俊
6eb49bb99S曾俊# 如果是在dadk中编译,那么安装到dadk的安装目录中
7eb49bb99S曾俊INSTALL_DIR?=$(DADK_CURRENT_BUILD_DIR)
8eb49bb99S曾俊# 如果是在本地编译,那么安装到当前目录下的install目录中
9eb49bb99S曾俊INSTALL_DIR?=./install
10eb49bb99S曾俊
11eb49bb99S曾俊
12eb49bb99S曾俊run:
13eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run
14eb49bb99S曾俊
15eb49bb99S曾俊build:
16eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build
17eb49bb99S曾俊
18eb49bb99S曾俊clean:
19eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean
20eb49bb99S曾俊
21eb49bb99S曾俊test:
22eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test
23eb49bb99S曾俊
24eb49bb99S曾俊doc:
25eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) doc
26eb49bb99S曾俊
27eb49bb99S曾俊run-release:
28eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run --release
29eb49bb99S曾俊
30eb49bb99S曾俊build-release:
31eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build --release
32eb49bb99S曾俊
33eb49bb99S曾俊clean-release:
34eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean --release
35eb49bb99S曾俊
36eb49bb99S曾俊test-release:
37eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test --release
38eb49bb99S曾俊
39eb49bb99S曾俊.PHONY: install
40eb49bb99S曾俊install:
41eb49bb99S曾俊	RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) install --path . --no-track --root $(INSTALL_DIR) --force
42