Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
  2. export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
  3. OUTPUT_DIR = $(DADK_BUILD_CACHE_DIR_DRAGONREACH_0_1_0)
  4. REACH_BIN_DIR=$(OUTPUT_DIR)/bin/
  5. TMP_INSTALL_DIR=$(OUTPUT_DIR)/tmp_install
  6. all: build
  7. build:
  8. cargo +nightly-2023-08-15 -Z build-std=core,alloc,compiler_builtins build --target ../x86_64-unknown-dragonos.json --release
  9. install:
  10. mkdir -p $(TMP_INSTALL_DIR)
  11. mkdir -p $(REACH_BIN_DIR)
  12. cargo -Z build-std=core,alloc,compiler_builtins install --target $(TARGET) --path . --root $(TMP_INSTALL_DIR)
  13. mv $(TMP_INSTALL_DIR)/bin/systemctl $(REACH_BIN_DIR)/systemctl
  14. rm -rf $(TMP_INSTALL_DIR)
  15. build-linux:
  16. cargo +nightly-2023-08-15 -Z build-std=core,alloc,compiler_builtins build --target x86_64-unknown-linux-gnu
  17. clean:
  18. cargo clean
  19. fmt:
  20. cargo fmt
  21. fmt-check:
  22. cargo fmt --check
  23. check:
  24. cargo +nightly-2023-08-15 -Z build-std=core,alloc,compiler_builtins check --workspace --message-format=json --target ../x86_64-unknown-dragonos.json