diff --git a/makefile-library b/makefile-library
index 7bc241dbe81ff7fd2174c93f5e1a51c72be89ad1..386e0560f99d74bbd5115f8c08d4ec88e7f9d372 100644
--- a/makefile-library
+++ b/makefile-library
@@ -69,6 +69,8 @@ ifneq ($(strip $(EXTRA_OBJECTS_DEBUG)),)
 ifneq ($(wildcard lib-debug/$(FULL_LIBRARY)),)
 ifneq ($(firstword $(EXISTENT_OBJECTS_DEBUG)),)
 $(shell touch $(firstword $(EXISTENT_OBJECTS_DEBUG)))
+$(shell rm $(EXTRA_OBJECTS_DEBUG))
+$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_OBJECTS_DEBUG)))
 endif
 endif
 endif
@@ -77,6 +79,8 @@ ifneq ($(strip $(EXTRA_TEST_OBJECTS_DEBUG)),)
 ifneq ($(wildcard test-bin-debug/$(TESTBIN)),)
 ifneq ($(firstword $(EXISTENT_TEST_OBJECTS_DEBUG)),)
 $(shell touch $(firstword $(EXISTENT_TEST_OBJECTS_DEBUG)))
+$(shell rm $(EXTRA_TEST_OBJECTS_DEBUG))
+$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_TEST_OBJECTS_DEBUG)))
 endif
 endif
 endif
@@ -85,6 +89,8 @@ ifneq ($(strip $(EXTRA_OBJECTS_RELEASE)),)
 ifneq ($(wildcard lib-release/$(FULL_LIBRARY)),)
 ifneq ($(firstword $(EXISTENT_OBJECTS_RELEASE)),)
 $(shell touch $(firstword $(EXISTENT_OBJECTS_RELEASE)))
+$(shell rm $(EXTRA_OBJECTS_RELEASE))
+$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_OBJECTS_RELEASE)))
 endif
 endif
 endif
@@ -93,6 +99,8 @@ ifneq ($(strip $(EXTRA_TEST_OBJECTS_RELEASE)),)
 ifneq ($(wildcard test-bin-release/$(TESTBIN)),)
 ifneq ($(firstword $(EXISTENT_TEST_OBJECTS_RELEASE)),)
 $(shell touch $(firstword $(EXISTENT_TEST_OBJECTS_RELEASE)))
+$(shell rm $(EXTRA_TEST_OBJECTS_RELEASE))
+$(shell rm $(patsubst obj-debug/%.o,obj-debug/%.d, $(EXTRA_TEST_OBJECTS_RELEASE)))
 endif
 endif
 endif