diff --git "a/Makefile.am" "b/Makefile.am"
index c88c465..9c1bb4d 100644
--- "a/Makefile.am"
+++ "b/Makefile.am"
@@ -25,7 +25,8 @@ MAKE_HOST =	@MAKE_HOST@
 if WINDOWSENV
   MAYBE_W32 =	w32
   W32INC =	-I $(top_srcdir)/w32/include
-  W32LIB =	-Lw32 -lw32
+  W32LIB =	$(top_builddir)/w32/libw32.a
+  make_LDFLAGS = -Wl,--out-implib=libgnumake-1.dll.a
   ossrc =
 else
   ossrc =	posixos.c
