diff --git a/src/Makefile b/src/Makefile
index 18ab524b8e3fbf282a07a4dd9a67167842aba422..7104a91cff214a818ce1b55942e9533ed6c757e0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -176,11 +176,7 @@ include Makefile.d/detect.mk
 # make would try to remove the implicitly made directories
 .PRECIOUS : %/ comptime.c
 
-# very sophisticated dependency
-sources:=\
-	$(call List,Sourcefile)\
-	$(call List,blua/Sourcefile)\
-
+sources:=
 makedir:=../make
 
 # -DCOMPVERSION: flag to use comptime.h
@@ -204,6 +200,11 @@ endif
 depdir:=$(makedir)/deps
 objdir:=$(makedir)/objs
 
+# very sophisticated dependency
+sources+=\
+	$(call List,Sourcefile)\
+	$(call List,blua/Sourcefile)\
+
 depends:=$(basename $(filter %.c %.s,$(sources)))
 objects:=$(basename $(filter %.c %.s %.nas,$(sources)))
 
diff --git a/src/Makefile.d/platform.mk b/src/Makefile.d/platform.mk
index 531d073e915f42748a6b176e506a79cd6aa142b9..fad4be191639266760e689628a0a5054635e67ff 100644
--- a/src/Makefile.d/platform.mk
+++ b/src/Makefile.d/platform.mk
@@ -7,9 +7,11 @@ PKG_CONFIG?=pkg-config
 ifdef WINDOWSHELL
 rmrf=-2>NUL DEL /S /Q
 mkdir=-2>NUL MD
+cat=TYPE
 else
 rmrf=rm -rf
 mkdir=mkdir -p
+cat=cat
 endif
 
 ifdef LINUX64
diff --git a/src/Makefile.d/util.mk b/src/Makefile.d/util.mk
index e76e324224b394c197ccd5b0ed496707f436e1b1..bda68df13a3d25892ec2a3933201d88686c580f4 100644
--- a/src/Makefile.d/util.mk
+++ b/src/Makefile.d/util.mk
@@ -10,7 +10,8 @@ Wildvar=$(foreach v,$(filter $(1),$(.VARIABLES)),$($(v)))
 
 # Read a list of words from file and prepend each with the
 # directory of the file.
-List=$(addprefix $(dir $(1)),$(file < $(1)))
+_cat=$(shell $(cat) $(call Windows_path,$(1)))
+List=$(addprefix $(dir $(1)),$(call _cat,$(1)))
 
 # Convert path separators to backslash on Windows.
 Windows_path=$(if $(WINDOWSHELL),$(subst /,\,$(1)),$(1))