Makefile: change clean logic

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-08-12 16:38:05 -04:00
commit a70797d6ad
Signed by: michaelsshaw
GPG key ID: 5A5E0FB20708A9E7

View file

@ -75,7 +75,9 @@ _modules: $(mod-targets) $(subdir-m) $(subdir-y)
.PHONY: _clean
_clean: $(subdir-y) $(subdir-m)
$(Q)echo " CLEAN $(obj)"
@rm -rf $(obj)/built-in.o $(real-objs-y) $(deps) $(mod-objs) $(mod-targets)
$(Q)rm -rf $(shell find $(obj) -type f -name '*.ko')
$(Q)rm -rf $(shell find $(obj) -type f -name '*.o')
$(Q)rm -rf $(shell find $(obj) -type f -name '*.d')
$(subdir-y): FORCE
$(Q)$(MAKE) --no-print-directory -f scripts/Makefile.build $(MAKECMDGOALS) obj=$(obj)/$@