diff --git a/Makefile.base b/Makefile.base index 0c5da103d1..ef5d77effe 100644 --- a/Makefile.base +++ b/Makefile.base @@ -68,7 +68,9 @@ $(BINDIR)/$(MODULE)/: $(BINDIR)/$(MODULE).a $(OBJ): | $(BINDIR)/$(MODULE)/ $(BINDIR)/$(MODULE).a: $(OBJ) | ${DIRS:%=ALL--%} - $(Q)$(AR) $(ARFLAGS) $@ $? + @# Recreate archive to cleanup deleted/non selected source files objects + $(Q)$(RM) $@ + $(Q)$(AR) $(ARFLAGS) $@ $^ CXXFLAGS = $(filter-out $(CXXUWFLAGS), $(CFLAGS)) $(CXXEXFLAGS) CCASFLAGS = $(filter-out $(CCASUWFLAGS), $(CFLAGS)) $(CCASEXFLAGS)