-include common/Makefile.common
-
-ifeq ($(DETECTED_OS),Linux)
-HOST_BINARY=linux
+GZIP=gzip
+# Windows' echo echos its input verbatim, on Posix there is some
+# amount of shell command line parsing going on. echo "" on
+# Windows yields literal "", on Linux yields an empty line
+ifeq ($(shell echo ""),)
+# This is probably a proper system, so we can use uname
+DELETE=rm -rf
+FLASH_TOOL=client/flasher
+platform=$(shell uname)
+ifneq (,$(findstring MINGW,$(platform)))
+FLASH_PORT=com3
+PATHSEP=\\#
+else
+FLASH_PORT=/dev/ttyACM0
+PATHSEP=/
+endif