diff --git a/configure b/configure
index 81c95fa4ad54ed126970134794d74dab0b3a17ad..b052ccf943d12c70ada72ebc0bd6a52137dae63d 100755
--- a/configure
+++ b/configure
@@ -312,7 +312,7 @@ ac_includes_default="\
 #endif"
 
 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS WINE_BINARIES MAIN_BINARY LDD LIBOBJS LTLIBOBJS'
-ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
+ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -18332,6 +18332,9 @@ MAKE_RULES=Make.rules
 MAKE_DLL_RULES=dlls/Makedll.rules
 
 
+MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
+
+
 MAKE_TEST_RULES=dlls/Maketest.rules
 
 
@@ -18341,7 +18344,7 @@ MAKE_LIB_RULES=libs/Makelib.rules
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mciavi32/Makefile dlls/mcicda/Makefile dlls/mciseq/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/tests/Makefile dlls/msacm/winemp3/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/msxml3/Makefile dlls/msxml3/tests/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/secur32/tests/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/usp10/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winecrt0/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/wineesd/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/hh/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Makeimplib.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/activeds/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/crypt32/tests/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput/tests/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mciavi32/Makefile dlls/mcicda/Makefile dlls/mciseq/Makefile dlls/midimap/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/tests/Makefile dlls/msacm/winemp3/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/mshtml/tests/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/msxml3/Makefile dlls/msxml3/tests/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/objsel/Makefile dlls/odbc32/Makefile dlls/odbccp32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/secur32/tests/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole2.tlb/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/usp10/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winecrt0/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/wineesd/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wldap32/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/hh/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -18874,6 +18877,7 @@ do
   # Handling of arguments.
   "Make.rules" ) CONFIG_FILES="$CONFIG_FILES Make.rules" ;;
   "dlls/Makedll.rules" ) CONFIG_FILES="$CONFIG_FILES dlls/Makedll.rules" ;;
+  "dlls/Makeimplib.rules" ) CONFIG_FILES="$CONFIG_FILES dlls/Makeimplib.rules" ;;
   "dlls/Maketest.rules" ) CONFIG_FILES="$CONFIG_FILES dlls/Maketest.rules" ;;
   "libs/Makelib.rules" ) CONFIG_FILES="$CONFIG_FILES libs/Makelib.rules" ;;
   "programs/Makeprog.rules" ) CONFIG_FILES="$CONFIG_FILES programs/Makeprog.rules" ;;
@@ -19357,6 +19361,8 @@ s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 s,@MAKE_RULES@,,;t t
 /@MAKE_DLL_RULES@/r $MAKE_DLL_RULES
 s,@MAKE_DLL_RULES@,,;t t
+/@MAKE_IMPLIB_RULES@/r $MAKE_IMPLIB_RULES
+s,@MAKE_IMPLIB_RULES@,,;t t
 /@MAKE_TEST_RULES@/r $MAKE_TEST_RULES
 s,@MAKE_TEST_RULES@,,;t t
 /@MAKE_LIB_RULES@/r $MAKE_LIB_RULES
diff --git a/configure.ac b/configure.ac
index b7058c3a8fa8324a7e3b2177f6afe25b1daa0581..c1148b2297d6450afe8118b6f0bd1c854c64e7b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1447,6 +1447,9 @@ AC_SUBST_FILE(MAKE_RULES)
 MAKE_DLL_RULES=dlls/Makedll.rules
 AC_SUBST_FILE(MAKE_DLL_RULES)
 
+MAKE_IMPLIB_RULES=dlls/Makeimplib.rules
+AC_SUBST_FILE(MAKE_IMPLIB_RULES)
+
 MAKE_TEST_RULES=dlls/Maketest.rules
 AC_SUBST_FILE(MAKE_TEST_RULES)
 
@@ -1459,6 +1462,7 @@ AC_SUBST_FILE(MAKE_PROG_RULES)
 AC_CONFIG_FILES([
 Make.rules
 dlls/Makedll.rules
+dlls/Makeimplib.rules
 dlls/Maketest.rules
 libs/Makelib.rules
 programs/Makeprog.rules
diff --git a/dlls/.cvsignore b/dlls/.cvsignore
index be1ab9de6e940603e921a0ef2dffe31d9d809cbf..60ef89a1d85ed06f9008b3c6804a40b2d7b4c5af 100644
--- a/dlls/.cvsignore
+++ b/dlls/.cvsignore
@@ -1,3 +1,4 @@
 Makedll.rules
 Makefile
+Makeimplib.rules
 Maketest.rules
diff --git a/dlls/Makeimplib.rules.in b/dlls/Makeimplib.rules.in
new file mode 100644
index 0000000000000000000000000000000000000000..f5c7b7369892f643c1e08af14d3ef750f1821d60
--- /dev/null
+++ b/dlls/Makeimplib.rules.in
@@ -0,0 +1,39 @@
+# Global rules for building a static import library     -*-Makefile-*-
+#
+# Each individual makefile should define the following variables:
+# MODULE       : name of the main module being built
+#
+# plus all variables required by the global Make.rules.in
+#
+
+DLLDEFS  = @DLLDEFS@
+DLLFLAGS = @DLLFLAGS@
+DEFS     = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS)
+
+@MAKE_RULES@
+
+all: $(MODULE)
+
+# Rules for .a library
+
+$(MODULE): $(OBJS) Makefile.in
+	$(RM) $@
+	$(AR) $@ $(OBJS)
+	$(RANLIB) $@
+
+# Rules for installation
+
+install install-dev:: $(MODULE)
+	$(MKINSTALLDIRS) $(dlldir)
+	$(INSTALL_DATA) $(MODULE) $(dlldir)/$(MODULE)
+
+uninstall::
+	[ ! -d $(dlldir) ] || (cd $(dlldir) && $(RM) $(MODULE))
+
+# Misc. rules
+
+.PHONY: man doc-html doc-sgml
+
+man doc-html doc-sgml:
+
+# End of global library rules
diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in
index f6141be45c75e2ae154077a76fe15134cd7f5b71..d1eb28c79c42e21b916b92419dc2bbadb14f2a14 100644
--- a/dlls/dxerr8/Makefile.in
+++ b/dlls/dxerr8/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -12,19 +9,6 @@ C_SRCS = \
 
 EXTRA_OBJS = $(MODULE).dbg.o
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man:
-
-doc-html:
-
-doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies:
diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in
index b4481c19f81f488a965750392be8007b0affeb3a..7a8f2fa67086c90b04644027d884b7ef5354bc59 100644
--- a/dlls/dxerr9/Makefile.in
+++ b/dlls/dxerr9/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -12,19 +9,6 @@ C_SRCS = \
 
 EXTRA_OBJS = $(MODULE).dbg.o
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man:
-
-doc-html:
-
-doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies:
diff --git a/dlls/dxguid/Makefile.in b/dlls/dxguid/Makefile.in
index 3ddcdbf7058567738422fba6a5ad38d9ebc20422..26fa8fd2b7cd8a4ebcaaddf3112fe615bb13a944 100644
--- a/dlls/dxguid/Makefile.in
+++ b/dlls/dxguid/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -12,19 +9,6 @@ C_SRCS = \
 	dx9guid.c \
 	dxguid.c
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man:
-
-doc-html:
-
-doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies:
diff --git a/dlls/strmiids/Makefile.in b/dlls/strmiids/Makefile.in
index a57fee18e684ada27b7985ef641ce22922ed5131..5f64dbbf72b1dce9916a8f54d7e158e687045862 100644
--- a/dlls/strmiids/Makefile.in
+++ b/dlls/strmiids/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -10,19 +7,6 @@ MODULE    = libstrmiids.a
 C_SRCS = \
 	strmiids.c
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man:
-
-doc-html:
-
-doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies:
diff --git a/dlls/uuid/Makefile.in b/dlls/uuid/Makefile.in
index 48f72918cd6dbb7b13c139919f98487334ae7205..a680ef48e8753b580d96e969b6c3449106ee0ea7 100644
--- a/dlls/uuid/Makefile.in
+++ b/dlls/uuid/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -10,19 +7,6 @@ MODULE    = libuuid.a
 C_SRCS = \
 	uuid.c
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man:
-
-doc-html:
-
-doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies:
diff --git a/dlls/winecrt0/Makefile.in b/dlls/winecrt0/Makefile.in
index d69f412e8529806f0f6f02ac4f27873ce1d12bca..bf3026aa927ed9a54255dfc69c612b05b3a30dec 100644
--- a/dlls/winecrt0/Makefile.in
+++ b/dlls/winecrt0/Makefile.in
@@ -1,6 +1,3 @@
-DLLDEFS   = @DLLDEFS@
-DLLFLAGS  = @DLLFLAGS@
-DEFS      = -D__WINESRC__ $(DLLDEFS)
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
@@ -12,15 +9,6 @@ C_SRCS = \
 	exe_main.c \
 	exe_wmain.c
 
-all: $(MODULE)
-
-@MAKE_RULES@
-
-$(MODULE): $(OBJS) Makefile.in
-	$(RM) $@
-	$(AR) $@ $(OBJS)
-	$(RANLIB) $@
-
-man doc-html doc-sgml:
+@MAKE_IMPLIB_RULES@
 
 ### Dependencies: