From ee8a8be09e16eb2c8c25f6602e657dd5df941523 Mon Sep 17 00:00:00 2001
From: Joakim Gebart <joakim.gebart@eistec.se>
Date: Fri, 10 Jul 2015 14:08:47 +0200
Subject: [PATCH] Makefile.include: Add clean-intermediates target

---
 Makefile.include | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile.include b/Makefile.include
index 4f975c0be0..a96faf5f3a 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -237,6 +237,11 @@ clean:
 	-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean ; done
 	-@rm -rf $(BINDIR)
 
+# Remove intermediates, but keep the .elf, .hex and .map etc.
+clean-intermediates:
+	-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean ; done
+	-@rm -rf $(BINDIR)/*.a $(BINDIR)/*/
+
 distclean:
 	-@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i distclean ; done
 	-@rm -rf $(BINDIRBASE)
-- 
GitLab