diff --git a/Makefile b/Makefile
index d04c42d56231eee0e126a0fdf88e4ba184dfa600..121b2488e5a1f36f4d1618b4dc991a9dc632db73 100644
--- a/Makefile
+++ b/Makefile
@@ -277,7 +277,7 @@ ifeq ($(OSARCH),SunOS)
   SOLINK=-shared -fpic -L/usr/local/ssl/lib
 endif
 
-ifeq ($(OSARCH),mingw32)
+ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
   SOLINK=-Xlinker -r
 endif