1*81c61261SMemoryShore# The toolchain we use. 2*81c61261SMemoryShore# You can get it by running DragonOS' `tools/bootstrap.sh` 3*81c61261SMemoryShoreTOOLCHAIN="+nightly-2023-08-15-x86_64-unknown-linux_dragonos-gnu" 4*81c61261SMemoryShoreRUSTFLAGS+="-C target-feature=+crt-static -C link-arg=-no-pie" 56f50094aSMemoryShore 6*81c61261SMemoryShore# 如果是在dadk中编译,那么安装到dadk的安装目录中 7*81c61261SMemoryShoreINSTALL_DIR?=$(DADK_CURRENT_BUILD_DIR) 8*81c61261SMemoryShore# 如果是在本地编译,那么安装到当前目录下的install目录中 9*81c61261SMemoryShoreINSTALL_DIR?=./install 106f50094aSMemoryShore 11*81c61261SMemoryShore 12*81c61261SMemoryShorerun: 13*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run 146f50094aSMemoryShore 156f50094aSMemoryShorebuild: 16*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build 176f50094aSMemoryShore 186f50094aSMemoryShoreclean: 19*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean 206f50094aSMemoryShore 21*81c61261SMemoryShoretest: 22*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test 236f50094aSMemoryShore 24*81c61261SMemoryShoredoc: 25*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) doc 266f50094aSMemoryShore 27*81c61261SMemoryShorerun-release: 28*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) run --release 29*81c61261SMemoryShore 30*81c61261SMemoryShorebuild-release: 31*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) build --release 32*81c61261SMemoryShore 33*81c61261SMemoryShoreclean-release: 34*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) clean --release 35*81c61261SMemoryShore 36*81c61261SMemoryShoretest-release: 37*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) test --release 38*81c61261SMemoryShore 39*81c61261SMemoryShore.PHONY: install 40*81c61261SMemoryShoreinstall: 41*81c61261SMemoryShore RUSTFLAGS=$(RUSTFLAGS) cargo $(TOOLCHAIN) install --path . --no-track --root $(INSTALL_DIR) --force 42