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_DRAGONREACH_0_1_0) 5REACH_ETC_DIR=$(OUTPUT_DIR)/etc/reach 6REACH_BIN_DIR=$(OUTPUT_DIR)/bin/ 7TMP_INSTALL_DIR=$(OUTPUT_DIR)/tmp_install 8 9all: build 10 11build: 12 cargo +nightly-2023-08-15 -Z build-std=core,alloc,compiler_builtins build --target ./x86_64-unknown-dragonos.json --release 13 14install: 15 mkdir -p $(TMP_INSTALL_DIR) 16 mkdir -p $(REACH_ETC_DIR) 17 mkdir -p $(REACH_ETC_DIR)/system/ 18 mkdir -p $(REACH_BIN_DIR) 19 20 cp ./parse_test/shell.service $(REACH_ETC_DIR)/system/shell.service 21 22 cargo +nightly-2023-08-15 -Z build-std=core,alloc,compiler_builtins install --target $(TARGET) --path . --root $(TMP_INSTALL_DIR) 23 mv $(TMP_INSTALL_DIR)/bin/DragonReach $(REACH_BIN_DIR)/DragonReach 24 rm -rf $(TMP_INSTALL_DIR) 25 26build-linux: 27 cargo -Z build-std=core,alloc,compiler_builtins build --target x86_64-unknown-linux-gnu 28 29clean: 30 cargo clean 31 32 33fmt: 34 cargo fmt 35 36fmt-check: 37 cargo fmt --check 38 39check: 40 cargo -Z build-std=core,alloc,compiler_builtins check --workspace --message-format=json --target ./x86_64-unknown-dragonos.json 41