From e5d5ad5c2ecb8bfc7185c2122d1ec1cdddb98ef6 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Tue, 2 Sep 2025 05:00:14 +0200 Subject: [PATCH] Make help target --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f678886..f1c4355 100644 --- a/Makefile +++ b/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