1
0
mirror of https://git.disroot.org/80486DX2-66/polonium.git synced 2024-11-08 13:42:31 +05:30

Makefile: extract variable of removed files and directories

This commit is contained in:
Intel A80486DX2-66 2024-07-08 21:05:11 +03:00
parent f4726c1d27
commit f0169f57e6
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -77,11 +77,14 @@ define rmdirs_if_empty
done
endef
FILES_TO_REMOVE = $(EXECPATH) $(DEP) $(OBJ)
DIRECTORIES_TO_REMOVE = $(BINDIR) $(OBJDIR)
clean:
$(call rmfiles_if_exist,$(EXECPATH) $(DEP) $(OBJ))
$(call rmdirs_if_empty,$(BINDIR) $(OBJDIR))
$(call rmfiles_if_exist,$(FILES_TO_REMOVE))
$(call rmdirs_if_empty,$(DIRECTORIES_TO_REMOVE))
distclean:
$(call rmdirs,$(BINDIR) $(OBJDIR))
$(call rmdirs,$(DIRECTORIES_TO_REMOVE))
.PHONY: all clean distclean