From b5cf188c0a406ab18c483928679005bdaadfb772 Mon Sep 17 00:00:00 2001 From: vhaudiquet Date: Fri, 3 Nov 2023 16:14:03 +0100 Subject: [PATCH] Makefile: Changed clean rule, fixed dep --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3d77f18..b42e893 100644 --- a/Makefile +++ b/Makefile @@ -19,9 +19,14 @@ $(BUILD_DIR)/$(NAME): $(C_FILES) | $(BUILD_DIR) $(BUILD_DIR): mkdir -p $(BUILD_DIR) -# Clean : clean build directory +# Clean : clean built executable .PHONY: clean clean: + rm -rf $(BUILD_DIR)/$(NAME) + +# Distclean : clean build directory +.PHONY: distclean +distclean: rm -rf $(BUILD_DIR) rungdb: all @@ -31,7 +36,7 @@ rungdb: all $(BUILD_DIR)/linux: cd $(BUILD_DIR) && git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth 1 -b v6.6 -$(BUILD_DIR)/linux/.config: hardware/linux.config +$(BUILD_DIR)/linux/.config: hardware/linux.config | $(BUILD_DIR)/linux cp hardware/linux.config $(BUILD_DIR)/linux/.config $(BUILD_DIR)/linux/vmlinux: $(BUILD_DIR)/linux/.config | $(BUILD_DIR)/linux