Update top-level Makefile

This commit is contained in:
Tate, Hongliang Tian
2022-08-16 20:22:49 -07:00
parent 1c8dc08c51
commit 2d7b00f9ba
3 changed files with 26 additions and 5 deletions

View File

@ -1,12 +1,21 @@
.PHONY: all build clean docs fmt test
.PHONY: all build clean docs fmt run setup test
all: build test
setup:
@rustup component add rust-src
@rustup component add llvm-tools-preview
@cargo install mdbook
build:
@cd src && cargo build
@cd src && cargo kbuild
@cd src && cargo kimage
run: build
@cd src && cargo krun
test: build
@cd src && cargo test
@#cd src && cargo test
docs:
@cd src && cargo doc # Build Rust docs

View File

@ -34,6 +34,18 @@ While there is nothing revolutionary in KxOS, it does explore some new design po
While most code is written in Rust, the project-scope build process is governed
by Makefile.
After downloading the source code, run the following command once to make sure
all developmennt tools are installed.
```bash
make setup
```
Then, we can build and test the project.
```bash
make
```
If everything goes well, then we can run the OS.
```bash
make run
```