diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/rugged/extconf.rb
+++ b/ext/rugged/extconf.rb
@@ -15,7 +15,14 @@ def sys(cmd)
   ret
 end
 
-if !(MAKE = find_executable('gmake') || find_executable('make'))
+MAKE = if Gem.win_platform?
+  # On Windows, Ruby-DevKit only has 'make'.
+  find_executable('make')
+else
+  find_executable('gmake') || find_executable('make')
+end
+
+if !MAKE
   abort "ERROR: GNU make is required to build Rugged."
 end
extconf: Do not try to find gmake on Windows

On Windows, Ruby-DevKit only has 'make', so if we find 'gmake' it comes
from somewhere else and most likely does not work with MSYS.