Make help target
This commit is contained in:
parent
17e8021a43
commit
e5d5ad5c2e
1 changed files with 13 additions and 1 deletions
14
Makefile
14
Makefile
|
@ -47,6 +47,7 @@ CFLAGS += -I./kern
|
|||
CFLAGS += -I./kern/libkern
|
||||
|
||||
all: kern/kernel.elf
|
||||
build: all
|
||||
|
||||
quickstart:
|
||||
make get_toolchain && bear -- make -j$(nproc) && make qemu
|
||||
|
@ -87,6 +88,17 @@ clean:
|
|||
format:
|
||||
find kern -type f -name '*.[ch]' -exec clang-format -i {} \;
|
||||
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo " quickstart – Runs get_toolchain, build and qemu in sequence. Generates compile-commands.json. RUN ONLY ONCE"
|
||||
@echo " build - Build the project"
|
||||
@echo " qemu - Run the kernel in qemu"
|
||||
@echo " clean – Remove build artifacts (*.o, *.d, *.elf)"
|
||||
@echo " distclean – Same as clean, but also purges toolchain"
|
||||
@echo " format – Run clang-format over all kernel sources"
|
||||
@echo " get_toolchain – Fetchest the toolchain and extracts it into ./toolchain"
|
||||
@echo " info – Get some general info on toolchain versions and flags"
|
||||
|
||||
TOOLCHAIN_DIR := toolchain
|
||||
|
||||
QEMU_TARBALL := xpack-qemu-riscv-$(QEMU_VER)-linux-x64.tar.gz
|
||||
|
@ -138,4 +150,4 @@ info:
|
|||
|
||||
-include *.d
|
||||
|
||||
.PHONY: all qemu info quickstart
|
||||
.PHONY: all qemu info quickstart help build
|
||||
|
|
Loading…
Add table
Reference in a new issue