diff --git a/Makefile b/Makefile index b2afe5bcfb..c6e0529498 100644 --- a/Makefile +++ b/Makefile @@ -766,6 +766,9 @@ endif rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc rm -rf $(TARGET_DIR)/usr/share/gtk-doc rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true +ifneq ($(BR2_ENABLE_DEBUG):$(BR2_STRIP_strip),y:) + rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug +endif $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true $(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true