Makefile 1.1 KB

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