1export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static 2export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup 3 4OUTPUT_DIR = $(DADK_BUILD_CACHE_DIR_NOVA_SHELL_0_1_0) 5TMP_INSTALL_DIR=$(OUTPUT_DIR)/tmp_install 6 7all: build 8 9build: 10 RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-no-pie' cargo build --target=x86_64-unknown-linux-musl --release 11 12install: 13 mkdir -p $(TMP_INSTALL_DIR) 14 mkdir -p $(OUTPUT_DIR) 15 16 RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-no-pie' cargo install --target=x86_64-unknown-linux-musl --path . --root $(TMP_INSTALL_DIR) 17 mv $(TMP_INSTALL_DIR)/bin/NovaShell $(OUTPUT_DIR)/NovaShell 18 rm -rf $(TMP_INSTALL_DIR) 19 20clean: 21 cargo clean 22 23 24fmt: 25 cargo fmt 26 27fmt-check: 28 cargo fmt --check 29