'make clean' only removes the objects and dependency files of the configuration it's run with ($(ARCH) and the optional libraries the Makefile detects), so after a cross build a plain 'make clean' doesn't remove the objects and dependency files specific to the target architecture. Remove every object and dependency file in the directories the Makefile builds in, along with guest/init and guest/pre_init, which depend on the configuration in the same way. List the directories by name so that objects elsewhere in the tree, such as those of a dtc clone used for LIBFDT_DIR, aren't removed. Signed-off-by: Fuad Tabba --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 84b8baa..6698cdb 100644 --- a/Makefile +++ b/Makefile @@ -557,12 +557,12 @@ clean: $(E) " CLEAN" $(Q) rm -f x86/bios/*.bin $(Q) rm -f x86/bios/*.elf - $(Q) rm -f x86/bios/*.o $(Q) rm -f x86/bios/bios-rom.h $(Q) rm -f tests/boot/boot_test.iso $(Q) rm -rf tests/boot/rootfs/ $(Q) rm -f $(DEPS) $(STATIC_DEPS) $(OBJS) $(OTHEROBJS) $(OBJS_DYNOPT) $(STATIC_OBJS) $(PROGRAM) $(PROGRAM_ALIAS) $(PROGRAM)-static $(GUEST_INIT) $(GUEST_PRE_INIT) $(GUEST_OBJS) - $(Q) rm -f guest/guest_init.c guest/guest_pre_init.c + $(Q) rm -f $(foreach d,. arm64 disk guest hw mips net/uip powerpc riscv ui util vfio virtio x86 x86/bios,$(d)/*.o $(d)/.*.d) + $(Q) rm -f guest/guest_init.c guest/guest_pre_init.c guest/init guest/pre_init $(Q) rm -f cscope.* $(Q) rm -f tags $(Q) rm -f TAGS base-commit: 2f3abe56dcd2658dc6dae3eeeb4996dc4b518bcf -- 2.47.3