diff --git a/Makefile.include b/Makefile.include
index 5fe885dc90d832db39ae2e53fc5305fd014ad54e..c16e016de87f1b53a6eefc6c8c1eb084209027e9 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -186,6 +186,11 @@ ifeq (,$(UNZIP_HERE))
   endif
 endif
 
+# Tool saving stdin to a file only on content update.
+# It keeps the file timestamp if it would end up the same.
+LAZYSPONGE ?= $(RIOTTOOLS)/lazysponge/lazysponge.py
+LAZYSPONGE_FLAGS ?= $(if $(filter 1,$(QUIET)),,--verbose)
+
 ifeq (, $(APPLICATION))
     $(error An application name must be specified as APPLICATION.)
 endif
diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk
index abe85369911e63c98934fa02cb5a0e3e8de04e73..7fc732cd1056ba3ca6bdea462e9c62232a961b76 100644
--- a/makefiles/vars.inc.mk
+++ b/makefiles/vars.inc.mk
@@ -88,3 +88,6 @@ export DLCACHE               # directory used to cache http downloads
 export DOWNLOAD_TO_FILE      # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
 export DOWNLOAD_TO_STDOUT    # Use `$(DOWNLOAD_TO_STDOUT) $(URL)` to download `$(URL)` output `$(URL)` to stdout, e.g. to be piped into `tar xz`.
 export UNZIP_HERE            # Use `cd $(SOME_FOLDER) && $(UNZIP_HERE) $(SOME_FILE)` to extract the contents of the zip file `$(SOME_FILE)` into `$(SOME_FOLDER)`.
+
+export LAZYSPONGE            # Command saving stdin to a file only on content update.
+export LAZYSPONGE_FLAGS      # Parameters supplied to LAZYSPONGE.