From 29e95d46f96dac322af8fcbc939e3967e79438ff Mon Sep 17 00:00:00 2001 From: HeatCrab Date: Sat, 24 Jan 2026 16:04:05 +0800 Subject: [PATCH] Fix build directory creation in rebuild target The rebuild target was only creating the app directory, causing compilation failures when building after 'make clean'. The compiler needs kernel and lib directories to exist before it can write dependency files during object compilation. Without these directories, the build process fails with file system errors when attempting to create .d files in non-existent paths. The rebuild target now creates all three required build directories (app, kernel, and lib) to ensure the build environment is properly initialized before compilation begins. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68175601..4bb9103c 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ $(BUILD_DIR)/code.txt: $(IMAGE_BASE).bin # Utility targets rebuild: $(Q)find '$(BUILD_APP_DIR)' -type f -name '*.o' -delete 2>/dev/null || true - $(Q)mkdir -p $(BUILD_APP_DIR) + $(Q)mkdir -p $(BUILD_APP_DIR) $(BUILD_KERNEL_DIR) $(BUILD_LIB_DIR) clean: $(VECHO) "Cleaning build artifacts...\n"