Write section access also assumes read access.
[wine] / dlls / Makefile.in
index cf43a42..1a7870d 100644 (file)
@@ -8,9 +8,10 @@ VPATH     = @srcdir@
 # special configure-dependent targets
 
 GLU32FILES = glu32
-OPENGLFILES = d3d8 d3dx8 opengl32
+GLUT32FILES = glut32
+OPENGLFILES = d3d8 d3d9 d3dx8 opengl32 wined3d
 XFILES = ddraw x11drv
-EXTRADIRS = @GLU32FILES@ @OPENGLFILES@ @XFILES@
+EXTRADIRS = @GLU32FILES@ @GLUT32FILES@ @OPENGLFILES@ @XFILES@
 
 # Subdir list
 
@@ -19,6 +20,8 @@ BASEDIRS = \
        avicap32 \
        avifil32 \
        cabinet \
+       capi2032 \
+       cfgmgr32 \
        comcat \
        comctl32 \
        commdlg \
@@ -30,13 +33,26 @@ BASEDIRS = \
        devenum \
        dinput \
        dinput8 \
+       dmband \
+       dmcompos \
+       dmime \
+       dmloader \
+       dmscript \
+       dmstyle \
+       dmsynth \
+       dmusic \
+       dmusic32 \
        dplay \
        dplayx \
+       dpnhpast \
        dsound \
+       dswave \
        gdi \
+       iccvid \
        icmp \
        imagehlp \
        imm32 \
+       iphlpapi \
        kernel \
        lzexpand \
        mapi32 \
@@ -47,17 +63,25 @@ BASEDIRS = \
        msacm/msg711 \
        msacm/winemp3 \
        msdmo \
+       mshtml \
+       msi \
        msimg32 \
        msisys \
        msnet32 \
        msvcrt \
        msvcrt20 \
+       msvcrt40 \
+       msvcrtd \
+       msvidc32 \
        msvideo \
        msvideo/msrle32 \
+       mswsock \
        netapi32 \
+       newdev \
        ntdll \
        odbc32 \
        ole32 \
+       oleacc \
        oleaut32 \
        olecli \
        oledlg \
@@ -69,6 +93,7 @@ BASEDIRS = \
        rasapi32 \
        richedit \
        rpcrt4 \
+       rsabase \
        serialui \
        setupapi \
        shdocvw \
@@ -80,9 +105,11 @@ BASEDIRS = \
        tapi32 \
        ttydrv \
        twain \
+       unicows \
        url \
        urlmon \
        user \
+       uxtheme \
        version \
        win32s \
        winaspi \
@@ -115,37 +142,42 @@ BASEDIRS = \
 SUBDIRS = \
        $(BASEDIRS) \
        d3d8 \
+       d3d9 \
        d3dx8 \
        ddraw \
+       dxguid \
        glu32 \
+       glut32 \
        opengl32 \
+       uuid \
+       wined3d \
        x11drv
 
 BUILDSUBDIRS = $(BASEDIRS) $(EXTRADIRS)
 
 INSTALLSUBDIRS = $(BUILDSUBDIRS)
 
-# Main target
-
 @MAKE_RULES@
 
+# Symbolic links
+
 WIN16_FILES = \
        avifile.dll$(DLLEXT) \
-       comm.dll$(DLLEXT) \
+       comm.drv$(DLLEXT) \
        commdlg.dll$(DLLEXT) \
        compobj.dll$(DLLEXT) \
        ctl3d.dll$(DLLEXT) \
        ctl3dv2.dll$(DLLEXT) \
        ddeml.dll$(DLLEXT) \
        dispdib.dll$(DLLEXT) \
-       display.dll$(DLLEXT) \
+       display.drv$(DLLEXT) \
        gdi.exe$(DLLEXT) \
        imm.dll$(DLLEXT) \
-       keyboard.dll$(DLLEXT) \
+       keyboard.drv$(DLLEXT) \
        krnl386.exe$(DLLEXT) \
        lzexpand.dll$(DLLEXT) \
        mmsystem.dll$(DLLEXT) \
-       mouse.dll$(DLLEXT) \
+       mouse.drv$(DLLEXT) \
        msacm.dll$(DLLEXT) \
        msvideo.dll$(DLLEXT) \
        ole2.dll$(DLLEXT) \
@@ -162,7 +194,7 @@ WIN16_FILES = \
        sound.dll$(DLLEXT) \
        storage.dll$(DLLEXT) \
        stress.dll$(DLLEXT) \
-       system.dll$(DLLEXT) \
+       system.drv$(DLLEXT) \
        toolhelp.dll$(DLLEXT) \
        typelib.dll$(DLLEXT) \
        user.exe$(DLLEXT) \
@@ -179,13 +211,15 @@ WIN16_FILES = \
        wintab.dll$(DLLEXT) \
        wprocs.dll$(DLLEXT)
 
-all: \
+SYMLINKS = \
        $(EXTRADIRS:%=%.dll$(DLLEXT)) \
        @WIN16_FILES@ \
        advapi32.dll$(DLLEXT) \
        avicap32.dll$(DLLEXT) \
        avifil32.dll$(DLLEXT) \
        cabinet.dll$(DLLEXT) \
+       capi2032.dll$(DLLEXT) \
+       cfgmgr32.dll$(DLLEXT) \
        comcat.dll$(DLLEXT) \
        comctl32.dll$(DLLEXT) \
        comdlg32.dll$(DLLEXT) \
@@ -197,16 +231,31 @@ all: \
        devenum.dll$(DLLEXT) \
        dinput.dll$(DLLEXT) \
        dinput8.dll$(DLLEXT) \
+       dmband.dll$(DLLEXT) \
+       dmcompos.dll$(DLLEXT) \
+       dmime.dll$(DLLEXT) \
+       dmloader.dll$(DLLEXT) \
+       dmscript.dll$(DLLEXT) \
+       dmstyle.dll$(DLLEXT) \
+       dmsynth.dll$(DLLEXT) \
+       dmusic.dll$(DLLEXT) \
+       dmusic32.dll$(DLLEXT) \
        dplay.dll$(DLLEXT) \
        dplayx.dll$(DLLEXT) \
+       dpnhpast.dll$(DLLEXT) \
        dsound.dll$(DLLEXT) \
+       dswave.dll$(DLLEXT) \
        gdi32.dll$(DLLEXT) \
+       iccvid.dll$(DLLEXT) \
        icmp.dll$(DLLEXT) \
        imaadp32.acm$(DLLEXT) \
        imagehlp.dll$(DLLEXT) \
        imm32.dll$(DLLEXT) \
+       iphlpapi.dll$(DLLEXT) \
        joystick.drv$(DLLEXT) \
        kernel32.dll$(DLLEXT) \
+       libdxguid.a \
+       libuuid.a \
        lz32.dll$(DLLEXT) \
        mapi32.dll$(DLLEXT) \
        mcianim.drv$(DLLEXT) \
@@ -221,17 +270,25 @@ all: \
        msadp32.acm$(DLLEXT) \
        msdmo.dll$(DLLEXT) \
        msg711.acm$(DLLEXT) \
+       mshtml.dll$(DLLEXT) \
+       msi.dll$(DLLEXT) \
        msimg32.dll$(DLLEXT) \
        msisys.ocx$(DLLEXT) \
        msnet32.dll$(DLLEXT) \
        msrle32.dll$(DLLEXT) \
        msvcrt.dll$(DLLEXT) \
        msvcrt20.dll$(DLLEXT) \
+       msvcrt40.dll$(DLLEXT) \
+       msvcrtd.dll$(DLLEXT) \
        msvfw32.dll$(DLLEXT) \
+       msvidc32.dll$(DLLEXT) \
+       mswsock.dll$(DLLEXT) \
        netapi32.dll$(DLLEXT) \
+       newdev.dll$(DLLEXT) \
        ntdll.dll$(DLLEXT) \
        odbc32.dll$(DLLEXT) \
        ole32.dll$(DLLEXT) \
+       oleacc.dll$(DLLEXT) \
        oleaut32.dll$(DLLEXT) \
        olecli32.dll$(DLLEXT) \
        oledlg.dll$(DLLEXT) \
@@ -243,6 +300,7 @@ all: \
        rasapi32.dll$(DLLEXT) \
        riched32.dll$(DLLEXT) \
        rpcrt4.dll$(DLLEXT) \
+       rsabase.dll$(DLLEXT) \
        serialui.dll$(DLLEXT) \
        setupapi.dll$(DLLEXT) \
        shdocvw.dll$(DLLEXT) \
@@ -254,9 +312,11 @@ all: \
        tapi32.dll$(DLLEXT) \
        ttydrv.dll$(DLLEXT) \
        twain_32.dll$(DLLEXT) \
+       unicows.dll$(DLLEXT) \
        url.dll$(DLLEXT) \
        urlmon.dll$(DLLEXT) \
        user32.dll$(DLLEXT) \
+       uxtheme.dll$(DLLEXT) \
        version.dll$(DLLEXT) \
        w32skrnl.dll$(DLLEXT) \
        winealsa.drv$(DLLEXT) \
@@ -279,6 +339,10 @@ all: \
        ws2_32.dll$(DLLEXT) \
        wsock32.dll$(DLLEXT)
 
+# Main target
+
+all: $(SYMLINKS)
+
 # Map symlink name to the corresponding library
 
 advapi32.dll$(DLLEXT): advapi32/advapi32.dll$(DLLEXT)
@@ -287,33 +351,51 @@ advapi32.dll$(DLLEXT): advapi32/advapi32.dll$(DLLEXT)
 avicap32.dll$(DLLEXT): avicap32/avicap32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) avicap32/avicap32.dll$(DLLEXT) $@
 
-avifil32.dll$(DLLEXT) avifile.dll$(DLLEXT): avifil32/avifil32.dll$(DLLEXT)
+avifil32.dll$(DLLEXT): avifil32/avifil32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) avifil32/avifil32.dll$(DLLEXT) $@
 
+avifile.dll$(DLLEXT) : avifil32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) avifil32.dll$(DLLEXT) $@
+
 cabinet.dll$(DLLEXT): cabinet/cabinet.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) cabinet/cabinet.dll$(DLLEXT) $@
 
+capi2032.dll$(DLLEXT): capi2032/capi2032.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) capi2032/capi2032.dll$(DLLEXT) $@
+
+cfgmgr32.dll$(DLLEXT): cfgmgr32/cfgmgr32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) cfgmgr32/cfgmgr32.dll$(DLLEXT) $@
+
 comcat.dll$(DLLEXT): comcat/comcat.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) comcat/comcat.dll$(DLLEXT) $@
 
 comctl32.dll$(DLLEXT): comctl32/comctl32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) comctl32/comctl32.dll$(DLLEXT) $@
 
-comdlg32.dll$(DLLEXT) commdlg.dll$(DLLEXT): commdlg/comdlg32.dll$(DLLEXT)
+comdlg32.dll$(DLLEXT): commdlg/comdlg32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) commdlg/comdlg32.dll$(DLLEXT) $@
 
+commdlg.dll$(DLLEXT) : comdlg32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) comdlg32.dll$(DLLEXT) $@
+
 crtdll.dll$(DLLEXT): crtdll/crtdll.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) crtdll/crtdll.dll$(DLLEXT) $@
 
 crypt32.dll$(DLLEXT): crypt32/crypt32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) crypt32/crypt32.dll$(DLLEXT) $@
 
-ctl3d32.dll$(DLLEXT) ctl3d.dll$(DLLEXT) ctl3dv2.dll$(DLLEXT): ctl3d/ctl3d32.dll$(DLLEXT)
+ctl3d32.dll$(DLLEXT): ctl3d/ctl3d32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) ctl3d/ctl3d32.dll$(DLLEXT) $@
 
+ctl3d.dll$(DLLEXT) ctl3dv2.dll$(DLLEXT) : ctl3d32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) ctl3d32.dll$(DLLEXT) $@
+
 d3d8.dll$(DLLEXT): d3d8/d3d8.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) d3d8/d3d8.dll$(DLLEXT) $@
 
+d3d9.dll$(DLLEXT): d3d9/d3d9.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) d3d9/d3d9.dll$(DLLEXT) $@
+
 d3dim.dll$(DLLEXT): d3dim/d3dim.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) d3dim/d3dim.dll$(DLLEXT) $@
 
@@ -335,22 +417,63 @@ dinput.dll$(DLLEXT): dinput/dinput.dll$(DLLEXT)
 dinput8.dll$(DLLEXT): dinput8/dinput8.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) dinput8/dinput8.dll$(DLLEXT) $@
 
+dmband.dll$(DLLEXT): dmband/dmband.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmband/dmband.dll$(DLLEXT) $@
+
+dmcompos.dll$(DLLEXT): dmcompos/dmcompos.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmcompos/dmcompos.dll$(DLLEXT) $@
+
+dmime.dll$(DLLEXT): dmime/dmime.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmime/dmime.dll$(DLLEXT) $@
+
+dmloader.dll$(DLLEXT): dmloader/dmloader.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmloader/dmloader.dll$(DLLEXT) $@
+
+dmscript.dll$(DLLEXT): dmscript/dmscript.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmscript/dmscript.dll$(DLLEXT) $@
+
+dmstyle.dll$(DLLEXT): dmstyle/dmstyle.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmstyle/dmstyle.dll$(DLLEXT) $@
+
+dmsynth.dll$(DLLEXT): dmsynth/dmsynth.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmsynth/dmsynth.dll$(DLLEXT) $@
+
+dmusic.dll$(DLLEXT): dmusic/dmusic.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmusic/dmusic.dll$(DLLEXT) $@
+
+dmusic32.dll$(DLLEXT): dmusic32/dmusic32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dmusic32/dmusic32.dll$(DLLEXT) $@
+
 dplay.dll$(DLLEXT): dplay/dplay.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) dplay/dplay.dll$(DLLEXT) $@
 
 dplayx.dll$(DLLEXT): dplayx/dplayx.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) dplayx/dplayx.dll$(DLLEXT) $@
 
+dpnhpast.dll$(DLLEXT): dpnhpast/dpnhpast.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dpnhpast/dpnhpast.dll$(DLLEXT) $@
+
 dsound.dll$(DLLEXT): dsound/dsound.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) dsound/dsound.dll$(DLLEXT) $@
 
-gdi32.dll$(DLLEXT) dispdib.dll$(DLLEXT) gdi.exe$(DLLEXT) \
-  wing.dll$(DLLEXT): gdi/gdi32.dll$(DLLEXT)
+dswave.dll$(DLLEXT): dswave/dswave.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) dswave/dswave.dll$(DLLEXT) $@
+
+gdi32.dll$(DLLEXT): gdi/gdi32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) gdi/gdi32.dll$(DLLEXT) $@
 
+dispdib.dll$(DLLEXT) gdi.exe$(DLLEXT) wing.dll$(DLLEXT) : gdi32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) gdi32.dll$(DLLEXT) $@
+
 glu32.dll$(DLLEXT): glu32/glu32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) glu32/glu32.dll$(DLLEXT) $@
 
+glut32.dll$(DLLEXT): glut32/glut32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) glut32/glut32.dll$(DLLEXT) $@
+
+iccvid.dll$(DLLEXT): iccvid/iccvid.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) iccvid/iccvid.dll$(DLLEXT) $@
+
 icmp.dll$(DLLEXT): icmp/icmp.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) icmp/icmp.dll$(DLLEXT) $@
 
@@ -360,20 +483,32 @@ imaadp32.acm$(DLLEXT): msacm/imaadp32/imaadp32.acm$(DLLEXT)
 imagehlp.dll$(DLLEXT): imagehlp/imagehlp.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) imagehlp/imagehlp.dll$(DLLEXT) $@
 
-imm32.dll$(DLLEXT) imm.dll$(DLLEXT): imm32/imm32.dll$(DLLEXT)
+imm32.dll$(DLLEXT): imm32/imm32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) imm32/imm32.dll$(DLLEXT) $@
 
+imm.dll$(DLLEXT) : imm32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) imm32.dll$(DLLEXT) $@
+
+iphlpapi.dll$(DLLEXT): iphlpapi/iphlpapi.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) iphlpapi/iphlpapi.dll$(DLLEXT) $@
+
 joystick.drv$(DLLEXT): winmm/joystick/joystick.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/joystick/joystick.drv$(DLLEXT) $@
 
-kernel32.dll$(DLLEXT) comm.dll$(DLLEXT) krnl386.exe$(DLLEXT) \
-  stress.dll$(DLLEXT) system.dll$(DLLEXT) toolhelp.dll$(DLLEXT) \
-  win87em.dll$(DLLEXT) windebug.dll$(DLLEXT) wprocs.dll$(DLLEXT): kernel/kernel32.dll$(DLLEXT)
+kernel32.dll$(DLLEXT): kernel/kernel32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) kernel/kernel32.dll$(DLLEXT) $@
 
-lz32.dll$(DLLEXT) lzexpand.dll$(DLLEXT): lzexpand/lz32.dll$(DLLEXT)
+comm.drv$(DLLEXT) krnl386.exe$(DLLEXT) stress.dll$(DLLEXT) \
+  system.drv$(DLLEXT) toolhelp.dll$(DLLEXT) win87em.dll$(DLLEXT) \
+  windebug.dll$(DLLEXT) : kernel32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) kernel32.dll$(DLLEXT) $@
+
+lz32.dll$(DLLEXT): lzexpand/lz32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) lzexpand/lz32.dll$(DLLEXT) $@
 
+lzexpand.dll$(DLLEXT) : lz32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) lz32.dll$(DLLEXT) $@
+
 mapi32.dll$(DLLEXT): mapi32/mapi32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) mapi32/mapi32.dll$(DLLEXT) $@
 
@@ -401,9 +536,12 @@ mpr.dll$(DLLEXT): mpr/mpr.dll$(DLLEXT)
 msacm.drv$(DLLEXT): winmm/wavemap/msacm.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/wavemap/msacm.drv$(DLLEXT) $@
 
-msacm32.dll$(DLLEXT) msacm.dll$(DLLEXT): msacm/msacm32.dll$(DLLEXT)
+msacm32.dll$(DLLEXT): msacm/msacm32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) msacm/msacm32.dll$(DLLEXT) $@
 
+msacm.dll$(DLLEXT) : msacm32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msacm32.dll$(DLLEXT) $@
+
 msadp32.acm$(DLLEXT): msacm/msadp32/msadp32.acm$(DLLEXT)
        $(RM) $@ && $(LN_S) msacm/msadp32/msadp32.acm$(DLLEXT) $@
 
@@ -413,6 +551,12 @@ msdmo.dll$(DLLEXT): msdmo/msdmo.dll$(DLLEXT)
 msg711.acm$(DLLEXT): msacm/msg711/msg711.acm$(DLLEXT)
        $(RM) $@ && $(LN_S) msacm/msg711/msg711.acm$(DLLEXT) $@
 
+mshtml.dll$(DLLEXT): mshtml/mshtml.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) mshtml/mshtml.dll$(DLLEXT) $@
+
+msi.dll$(DLLEXT): msi/msi.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msi/msi.dll$(DLLEXT) $@
+
 msimg32.dll$(DLLEXT): msimg32/msimg32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) msimg32/msimg32.dll$(DLLEXT) $@
 
@@ -431,38 +575,71 @@ msvcrt.dll$(DLLEXT): msvcrt/msvcrt.dll$(DLLEXT)
 msvcrt20.dll$(DLLEXT): msvcrt20/msvcrt20.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) msvcrt20/msvcrt20.dll$(DLLEXT) $@
 
-msvfw32.dll$(DLLEXT) msvideo.dll$(DLLEXT): msvideo/msvfw32.dll$(DLLEXT)
+msvcrt40.dll$(DLLEXT): msvcrt40/msvcrt40.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msvcrt40/msvcrt40.dll$(DLLEXT) $@
+
+msvcrtd.dll$(DLLEXT): msvcrtd/msvcrtd.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msvcrtd/msvcrtd.dll$(DLLEXT) $@
+
+msvfw32.dll$(DLLEXT): msvideo/msvfw32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) msvideo/msvfw32.dll$(DLLEXT) $@
 
+msvideo.dll$(DLLEXT) : msvfw32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msvfw32.dll$(DLLEXT) $@
+
+msvidc32.dll$(DLLEXT): msvidc32/msvidc32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) msvidc32/msvidc32.dll$(DLLEXT) $@
+
+mswsock.dll$(DLLEXT): mswsock/mswsock.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) mswsock/mswsock.dll$(DLLEXT) $@
+
 netapi32.dll$(DLLEXT): netapi32/netapi32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) netapi32/netapi32.dll$(DLLEXT) $@
 
+newdev.dll$(DLLEXT): newdev/newdev.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) newdev/newdev.dll$(DLLEXT) $@
+
 ntdll.dll$(DLLEXT): ntdll/ntdll.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) ntdll/ntdll.dll$(DLLEXT) $@
 
 odbc32.dll$(DLLEXT): odbc32/odbc32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) odbc32/odbc32.dll$(DLLEXT) $@
 
-ole32.dll$(DLLEXT) compobj.dll$(DLLEXT) ole2.dll$(DLLEXT) \
-  ole2conv.dll$(DLLEXT) ole2nls.dll$(DLLEXT) ole2prox.dll$(DLLEXT) \
-  ole2thk.dll$(DLLEXT) storage.dll$(DLLEXT): ole32/ole32.dll$(DLLEXT)
+ole32.dll$(DLLEXT): ole32/ole32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) ole32/ole32.dll$(DLLEXT) $@
 
-oleaut32.dll$(DLLEXT) ole2disp.dll$(DLLEXT) typelib.dll$(DLLEXT): oleaut32/oleaut32.dll$(DLLEXT)
+compobj.dll$(DLLEXT) ole2.dll$(DLLEXT) ole2conv.dll$(DLLEXT) \
+  ole2nls.dll$(DLLEXT) ole2prox.dll$(DLLEXT) ole2thk.dll$(DLLEXT) \
+  storage.dll$(DLLEXT) : ole32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) ole32.dll$(DLLEXT) $@
+
+oleacc.dll$(DLLEXT): oleacc/oleacc.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) oleacc/oleacc.dll$(DLLEXT) $@
+
+oleaut32.dll$(DLLEXT): oleaut32/oleaut32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) oleaut32/oleaut32.dll$(DLLEXT) $@
 
-olecli32.dll$(DLLEXT) olecli.dll$(DLLEXT): olecli/olecli32.dll$(DLLEXT)
+ole2disp.dll$(DLLEXT) typelib.dll$(DLLEXT) : oleaut32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) oleaut32.dll$(DLLEXT) $@
+
+olecli32.dll$(DLLEXT): olecli/olecli32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) olecli/olecli32.dll$(DLLEXT) $@
 
+olecli.dll$(DLLEXT) : olecli32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) olecli32.dll$(DLLEXT) $@
+
 oledlg.dll$(DLLEXT): oledlg/oledlg.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) oledlg/oledlg.dll$(DLLEXT) $@
 
 olepro32.dll$(DLLEXT): olepro32/olepro32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) olepro32/olepro32.dll$(DLLEXT) $@
 
-olesvr32.dll$(DLLEXT) olesvr.dll$(DLLEXT): olesvr/olesvr32.dll$(DLLEXT)
+olesvr32.dll$(DLLEXT): olesvr/olesvr32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) olesvr/olesvr32.dll$(DLLEXT) $@
 
+olesvr.dll$(DLLEXT) : olesvr32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) olesvr32.dll$(DLLEXT) $@
+
 opengl32.dll$(DLLEXT): opengl32/opengl32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) opengl32/opengl32.dll$(DLLEXT) $@
 
@@ -475,27 +652,39 @@ qcap.dll$(DLLEXT): qcap/qcap.dll$(DLLEXT)
 quartz.dll$(DLLEXT): quartz/quartz.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) quartz/quartz.dll$(DLLEXT) $@
 
-rasapi32.dll$(DLLEXT) rasapi16.dll$(DLLEXT): rasapi32/rasapi32.dll$(DLLEXT)
+rasapi32.dll$(DLLEXT): rasapi32/rasapi32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) rasapi32/rasapi32.dll$(DLLEXT) $@
 
+rasapi16.dll$(DLLEXT) : rasapi32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) rasapi32.dll$(DLLEXT) $@
+
 riched32.dll$(DLLEXT): richedit/riched32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) richedit/riched32.dll$(DLLEXT) $@
 
 rpcrt4.dll$(DLLEXT): rpcrt4/rpcrt4.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) rpcrt4/rpcrt4.dll$(DLLEXT) $@
 
+rsabase.dll$(DLLEXT): rsabase/rsabase.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) rsabase/rsabase.dll$(DLLEXT) $@
+
 serialui.dll$(DLLEXT): serialui/serialui.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) serialui/serialui.dll$(DLLEXT) $@
 
-setupapi.dll$(DLLEXT) setupx.dll$(DLLEXT): setupapi/setupapi.dll$(DLLEXT)
+setupapi.dll$(DLLEXT): setupapi/setupapi.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) setupapi/setupapi.dll$(DLLEXT) $@
 
+setupx.dll$(DLLEXT) : setupapi.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) setupapi.dll$(DLLEXT) $@
+
 shdocvw.dll$(DLLEXT): shdocvw/shdocvw.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) shdocvw/shdocvw.dll$(DLLEXT) $@
 
-shell32.dll$(DLLEXT) shell.dll$(DLLEXT): shell32/shell32.dll$(DLLEXT)
+shell32.dll$(DLLEXT): shell32/shell32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) shell32/shell32.dll$(DLLEXT) $@
 
+shell.dll$(DLLEXT) : shell32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) shell32.dll$(DLLEXT) $@
+
 shfolder.dll$(DLLEXT): shfolder/shfolder.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) shfolder/shfolder.dll$(DLLEXT) $@
 
@@ -517,22 +706,37 @@ ttydrv.dll$(DLLEXT): ttydrv/ttydrv.dll$(DLLEXT)
 twain_32.dll$(DLLEXT): twain/twain_32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) twain/twain_32.dll$(DLLEXT) $@
 
+unicows.dll$(DLLEXT): unicows/unicows.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) unicows/unicows.dll$(DLLEXT) $@
+
 url.dll$(DLLEXT): url/url.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) url/url.dll$(DLLEXT) $@
 
 urlmon.dll$(DLLEXT): urlmon/urlmon.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) urlmon/urlmon.dll$(DLLEXT) $@
 
-user32.dll$(DLLEXT) ddeml.dll$(DLLEXT) display.dll$(DLLEXT) \
-  keyboard.dll$(DLLEXT) mouse.dll$(DLLEXT) user.exe$(DLLEXT): user/user32.dll$(DLLEXT)
+user32.dll$(DLLEXT): user/user32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) user/user32.dll$(DLLEXT) $@
 
-version.dll$(DLLEXT) ver.dll$(DLLEXT): version/version.dll$(DLLEXT)
+ddeml.dll$(DLLEXT) display.drv$(DLLEXT) keyboard.drv$(DLLEXT) \
+  mouse.drv$(DLLEXT) user.exe$(DLLEXT) : user32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) user32.dll$(DLLEXT) $@
+
+uxtheme.dll$(DLLEXT): uxtheme/uxtheme.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) uxtheme/uxtheme.dll$(DLLEXT) $@
+
+version.dll$(DLLEXT): version/version.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) version/version.dll$(DLLEXT) $@
 
-w32skrnl.dll$(DLLEXT) w32sys.dll$(DLLEXT) win32s16.dll$(DLLEXT): win32s/w32skrnl.dll$(DLLEXT)
+ver.dll$(DLLEXT) : version.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) version.dll$(DLLEXT) $@
+
+w32skrnl.dll$(DLLEXT): win32s/w32skrnl.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) win32s/w32skrnl.dll$(DLLEXT) $@
 
+w32sys.dll$(DLLEXT) win32s16.dll$(DLLEXT) : w32skrnl.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) w32skrnl.dll$(DLLEXT) $@
+
 winealsa.drv$(DLLEXT): winmm/winealsa/winealsa.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/winealsa/winealsa.drv$(DLLEXT) $@
 
@@ -542,9 +746,15 @@ winearts.drv$(DLLEXT): winmm/winearts/winearts.drv$(DLLEXT)
 wineaudioio.drv$(DLLEXT): winmm/wineaudioio/wineaudioio.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/wineaudioio/wineaudioio.drv$(DLLEXT) $@
 
+wined3d.dll$(DLLEXT): wined3d/wined3d.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) wined3d/wined3d.dll$(DLLEXT) $@
+
 winedos.dll$(DLLEXT): winedos/winedos.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) winedos/winedos.dll$(DLLEXT) $@
 
+wprocs.dll$(DLLEXT) : winedos.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) winedos.dll$(DLLEXT) $@
+
 winejack.drv$(DLLEXT): winmm/winejack/winejack.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/winejack/winejack.drv$(DLLEXT) $@
 
@@ -557,42 +767,66 @@ winenas.drv$(DLLEXT): winmm/winenas/winenas.drv$(DLLEXT)
 wineoss.drv$(DLLEXT): winmm/wineoss/wineoss.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/wineoss/wineoss.drv$(DLLEXT) $@
 
-wineps.dll$(DLLEXT) wineps16.drv$(DLLEXT): wineps/wineps.dll$(DLLEXT)
+wineps.dll$(DLLEXT): wineps/wineps.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wineps/wineps.dll$(DLLEXT) $@
 
+wineps16.drv$(DLLEXT) : wineps.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) wineps.dll$(DLLEXT) $@
+
 wininet.dll$(DLLEXT): wininet/wininet.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wininet/wininet.dll$(DLLEXT) $@
 
-winmm.dll$(DLLEXT) mmsystem.dll$(DLLEXT) sound.dll$(DLLEXT): winmm/winmm.dll$(DLLEXT)
+winmm.dll$(DLLEXT): winmm/winmm.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) winmm/winmm.dll$(DLLEXT) $@
 
-winnls32.dll$(DLLEXT) winnls.dll$(DLLEXT): winnls/winnls32.dll$(DLLEXT)
+mmsystem.dll$(DLLEXT) sound.dll$(DLLEXT) : winmm.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) winmm.dll$(DLLEXT) $@
+
+winnls32.dll$(DLLEXT): winnls/winnls32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) winnls/winnls32.dll$(DLLEXT) $@
 
+winnls.dll$(DLLEXT) : winnls32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) winnls32.dll$(DLLEXT) $@
+
 winspool.drv$(DLLEXT): winspool/winspool.drv$(DLLEXT)
        $(RM) $@ && $(LN_S) winspool/winspool.drv$(DLLEXT) $@
 
-wintab32.dll$(DLLEXT) wintab.dll$(DLLEXT): wintab32/wintab32.dll$(DLLEXT)
+wintab32.dll$(DLLEXT): wintab32/wintab32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wintab32/wintab32.dll$(DLLEXT) $@
 
+wintab.dll$(DLLEXT) : wintab32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) wintab32.dll$(DLLEXT) $@
+
 wintrust.dll$(DLLEXT): wintrust/wintrust.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wintrust/wintrust.dll$(DLLEXT) $@
 
-wnaspi32.dll$(DLLEXT) winaspi.dll$(DLLEXT): winaspi/wnaspi32.dll$(DLLEXT)
+wnaspi32.dll$(DLLEXT): winaspi/wnaspi32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) winaspi/wnaspi32.dll$(DLLEXT) $@
 
+winaspi.dll$(DLLEXT) : wnaspi32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) wnaspi32.dll$(DLLEXT) $@
+
 wow32.dll$(DLLEXT): wow32/wow32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wow32/wow32.dll$(DLLEXT) $@
 
-ws2_32.dll$(DLLEXT) winsock.dll$(DLLEXT): winsock/ws2_32.dll$(DLLEXT)
+ws2_32.dll$(DLLEXT): winsock/ws2_32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) winsock/ws2_32.dll$(DLLEXT) $@
 
+winsock.dll$(DLLEXT) : ws2_32.dll$(DLLEXT)
+       $(RM) $@ && $(LN_S) ws2_32.dll$(DLLEXT) $@
+
 wsock32.dll$(DLLEXT): wsock32/wsock32.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) wsock32/wsock32.dll$(DLLEXT) $@
 
 x11drv.dll$(DLLEXT): x11drv/x11drv.dll$(DLLEXT)
        $(RM) $@ && $(LN_S) x11drv/x11drv.dll$(DLLEXT) $@
 
+libdxguid.a: dxguid/libdxguid.a
+       $(RM) $@ && $(LN_S) dxguid/libdxguid.a $@
+
+libuuid.a: uuid/libuuid.a
+       $(RM) $@ && $(LN_S) uuid/libuuid.a $@
+
 
 # Import libraries
 
@@ -601,6 +835,8 @@ IMPORT_LIBS = \
        libavicap32 \
        libavifil32 \
        libcabinet \
+       libcapi2032 \
+       libcfgmgr32 \
        libcomcat \
        libcomctl32 \
        libcomdlg32 \
@@ -608,6 +844,7 @@ IMPORT_LIBS = \
        libcrypt32 \
        libctl3d32 \
        libd3d8 \
+       libd3d9 \
        libd3dim \
        libd3dx8 \
        libdciman32 \
@@ -615,30 +852,52 @@ IMPORT_LIBS = \
        libdevenum \
        libdinput \
        libdinput8 \
+       libdmband \
+       libdmcompos \
+       libdmime \
+       libdmloader \
+       libdmscript \
+       libdmstyle \
+       libdmsynth \
+       libdmusic \
+       libdmusic32 \
        libdplay \
        libdplayx \
+       libdpnhpast \
        libdsound \
+       libdswave \
        libgdi32 \
        libglu32 \
+       libglut32 \
+       libiccvid \
        libicmp \
        libimagehlp \
        libimm32 \
+       libiphlpapi \
        libkernel32 \
        liblz32 \
        libmapi32 \
        libmpr \
        libmsacm32 \
        libmsdmo \
+       libmshtml \
+       libmsi \
        libmsimg32 \
        libmsnet32 \
        libmsrle32 \
        libmsvcrt \
        libmsvcrt20 \
+       libmsvcrt40 \
+       libmsvcrtd \
        libmsvfw32 \
+       libmsvidc32 \
+       libmswsock \
        libnetapi32 \
+       libnewdev \
        libntdll \
        libodbc32 \
        libole32 \
+       liboleacc \
        liboleaut32 \
        libolecli32 \
        liboledlg \
@@ -651,6 +910,7 @@ IMPORT_LIBS = \
        librasapi32 \
        libriched32 \
        librpcrt4 \
+       librsabase \
        libserialui \
        libsetupapi \
        libshdocvw \
@@ -662,11 +922,14 @@ IMPORT_LIBS = \
        libtapi32 \
        libttydrv \
        libtwain_32 \
+       libunicows \
        liburl \
        liburlmon \
        libuser32 \
+       libuxtheme \
        libversion \
        libw32skrnl \
+       libwined3d \
        libwinedos \
        libwineps \
        libwininet \
@@ -681,6 +944,11 @@ IMPORT_LIBS = \
        libwsock32 \
        libx11drv
 
+ALL_IMPORT_LIBS = \
+       $(IMPORT_LIBS:%=%.$(IMPLIBEXT)) \
+       libdxguid.a \
+       libuuid.a
+
 libadvapi32.def: advapi32/advapi32.spec.def
        $(RM) $@ && $(LN_S) advapi32/advapi32.spec.def $@
 libadvapi32.a: advapi32/advapi32.spec.def
@@ -701,6 +969,16 @@ libcabinet.def: cabinet/cabinet.spec.def
 libcabinet.a: cabinet/cabinet.spec.def
        $(DLLTOOL) -k -l $@ -d cabinet/cabinet.spec.def
 
+libcapi2032.def: capi2032/capi2032.spec.def
+       $(RM) $@ && $(LN_S) capi2032/capi2032.spec.def $@
+libcapi2032.a: capi2032/capi2032.spec.def
+       $(DLLTOOL) -k -l $@ -d capi2032/capi2032.spec.def
+
+libcfgmgr32.def: cfgmgr32/cfgmgr32.spec.def
+       $(RM) $@ && $(LN_S) cfgmgr32/cfgmgr32.spec.def $@
+libcfgmgr32.a: cfgmgr32/cfgmgr32.spec.def
+       $(DLLTOOL) -k -l $@ -d cfgmgr32/cfgmgr32.spec.def
+
 libcomcat.def: comcat/comcat.spec.def
        $(RM) $@ && $(LN_S) comcat/comcat.spec.def $@
 libcomcat.a: comcat/comcat.spec.def
@@ -736,6 +1014,11 @@ libd3d8.def: d3d8/d3d8.spec.def
 libd3d8.a: d3d8/d3d8.spec.def
        $(DLLTOOL) -k -l $@ -d d3d8/d3d8.spec.def
 
+libd3d9.def: d3d9/d3d9.spec.def
+       $(RM) $@ && $(LN_S) d3d9/d3d9.spec.def $@
+libd3d9.a: d3d9/d3d9.spec.def
+       $(DLLTOOL) -k -l $@ -d d3d9/d3d9.spec.def
+
 libd3dim.def: d3dim/d3dim.spec.def
        $(RM) $@ && $(LN_S) d3dim/d3dim.spec.def $@
 libd3dim.a: d3dim/d3dim.spec.def
@@ -771,6 +1054,51 @@ libdinput8.def: dinput8/dinput8.spec.def
 libdinput8.a: dinput8/dinput8.spec.def
        $(DLLTOOL) -k -l $@ -d dinput8/dinput8.spec.def
 
+libdmband.def: dmband/dmband.spec.def
+       $(RM) $@ && $(LN_S) dmband/dmband.spec.def $@
+libdmband.a: dmband/dmband.spec.def
+       $(DLLTOOL) -k -l $@ -d dmband/dmband.spec.def
+
+libdmcompos.def: dmcompos/dmcompos.spec.def
+       $(RM) $@ && $(LN_S) dmcompos/dmcompos.spec.def $@
+libdmcompos.a: dmcompos/dmcompos.spec.def
+       $(DLLTOOL) -k -l $@ -d dmcompos/dmcompos.spec.def
+
+libdmime.def: dmime/dmime.spec.def
+       $(RM) $@ && $(LN_S) dmime/dmime.spec.def $@
+libdmime.a: dmime/dmime.spec.def
+       $(DLLTOOL) -k -l $@ -d dmime/dmime.spec.def
+
+libdmloader.def: dmloader/dmloader.spec.def
+       $(RM) $@ && $(LN_S) dmloader/dmloader.spec.def $@
+libdmloader.a: dmloader/dmloader.spec.def
+       $(DLLTOOL) -k -l $@ -d dmloader/dmloader.spec.def
+
+libdmscript.def: dmscript/dmscript.spec.def
+       $(RM) $@ && $(LN_S) dmscript/dmscript.spec.def $@
+libdmscript.a: dmscript/dmscript.spec.def
+       $(DLLTOOL) -k -l $@ -d dmscript/dmscript.spec.def
+
+libdmstyle.def: dmstyle/dmstyle.spec.def
+       $(RM) $@ && $(LN_S) dmstyle/dmstyle.spec.def $@
+libdmstyle.a: dmstyle/dmstyle.spec.def
+       $(DLLTOOL) -k -l $@ -d dmstyle/dmstyle.spec.def
+
+libdmsynth.def: dmsynth/dmsynth.spec.def
+       $(RM) $@ && $(LN_S) dmsynth/dmsynth.spec.def $@
+libdmsynth.a: dmsynth/dmsynth.spec.def
+       $(DLLTOOL) -k -l $@ -d dmsynth/dmsynth.spec.def
+
+libdmusic.def: dmusic/dmusic.spec.def
+       $(RM) $@ && $(LN_S) dmusic/dmusic.spec.def $@
+libdmusic.a: dmusic/dmusic.spec.def
+       $(DLLTOOL) -k -l $@ -d dmusic/dmusic.spec.def
+
+libdmusic32.def: dmusic32/dmusic32.spec.def
+       $(RM) $@ && $(LN_S) dmusic32/dmusic32.spec.def $@
+libdmusic32.a: dmusic32/dmusic32.spec.def
+       $(DLLTOOL) -k -l $@ -d dmusic32/dmusic32.spec.def
+
 libdplay.def: dplay/dplay.spec.def
        $(RM) $@ && $(LN_S) dplay/dplay.spec.def $@
 libdplay.a: dplay/dplay.spec.def
@@ -781,11 +1109,21 @@ libdplayx.def: dplayx/dplayx.spec.def
 libdplayx.a: dplayx/dplayx.spec.def
        $(DLLTOOL) -k -l $@ -d dplayx/dplayx.spec.def
 
+libdpnhpast.def: dpnhpast/dpnhpast.spec.def
+       $(RM) $@ && $(LN_S) dpnhpast/dpnhpast.spec.def $@
+libdpnhpast.a: dpnhpast/dpnhpast.spec.def
+       $(DLLTOOL) -k -l $@ -d dpnhpast/dpnhpast.spec.def
+
 libdsound.def: dsound/dsound.spec.def
        $(RM) $@ && $(LN_S) dsound/dsound.spec.def $@
 libdsound.a: dsound/dsound.spec.def
        $(DLLTOOL) -k -l $@ -d dsound/dsound.spec.def
 
+libdswave.def: dswave/dswave.spec.def
+       $(RM) $@ && $(LN_S) dswave/dswave.spec.def $@
+libdswave.a: dswave/dswave.spec.def
+       $(DLLTOOL) -k -l $@ -d dswave/dswave.spec.def
+
 libgdi32.def: gdi/gdi32.spec.def
        $(RM) $@ && $(LN_S) gdi/gdi32.spec.def $@
 libgdi32.a: gdi/gdi32.spec.def
@@ -796,6 +1134,16 @@ libglu32.def: glu32/glu32.spec.def
 libglu32.a: glu32/glu32.spec.def
        $(DLLTOOL) -k -l $@ -d glu32/glu32.spec.def
 
+libglut32.def: glut32/glut32.spec.def
+       $(RM) $@ && $(LN_S) glut32/glut32.spec.def $@
+libglut32.a: glut32/glut32.spec.def
+       $(DLLTOOL) -k -l $@ -d glut32/glut32.spec.def
+
+libiccvid.def: iccvid/iccvid.spec.def
+       $(RM) $@ && $(LN_S) iccvid/iccvid.spec.def $@
+libiccvid.a: iccvid/iccvid.spec.def
+       $(DLLTOOL) -k -l $@ -d iccvid/iccvid.spec.def
+
 libicmp.def: icmp/icmp.spec.def
        $(RM) $@ && $(LN_S) icmp/icmp.spec.def $@
 libicmp.a: icmp/icmp.spec.def
@@ -811,6 +1159,11 @@ libimm32.def: imm32/imm32.spec.def
 libimm32.a: imm32/imm32.spec.def
        $(DLLTOOL) -k -l $@ -d imm32/imm32.spec.def
 
+libiphlpapi.def: iphlpapi/iphlpapi.spec.def
+       $(RM) $@ && $(LN_S) iphlpapi/iphlpapi.spec.def $@
+libiphlpapi.a: iphlpapi/iphlpapi.spec.def
+       $(DLLTOOL) -k -l $@ -d iphlpapi/iphlpapi.spec.def
+
 libkernel32.def: kernel/kernel32.spec.def
        $(RM) $@ && $(LN_S) kernel/kernel32.spec.def $@
 libkernel32.a: kernel/kernel32.spec.def
@@ -841,6 +1194,16 @@ libmsdmo.def: msdmo/msdmo.spec.def
 libmsdmo.a: msdmo/msdmo.spec.def
        $(DLLTOOL) -k -l $@ -d msdmo/msdmo.spec.def
 
+libmshtml.def: mshtml/mshtml.spec.def
+       $(RM) $@ && $(LN_S) mshtml/mshtml.spec.def $@
+libmshtml.a: mshtml/mshtml.spec.def
+       $(DLLTOOL) -k -l $@ -d mshtml/mshtml.spec.def
+
+libmsi.def: msi/msi.spec.def
+       $(RM) $@ && $(LN_S) msi/msi.spec.def $@
+libmsi.a: msi/msi.spec.def
+       $(DLLTOOL) -k -l $@ -d msi/msi.spec.def
+
 libmsimg32.def: msimg32/msimg32.spec.def
        $(RM) $@ && $(LN_S) msimg32/msimg32.spec.def $@
 libmsimg32.a: msimg32/msimg32.spec.def
@@ -866,16 +1229,41 @@ libmsvcrt20.def: msvcrt20/msvcrt20.spec.def
 libmsvcrt20.a: msvcrt20/msvcrt20.spec.def
        $(DLLTOOL) -k -l $@ -d msvcrt20/msvcrt20.spec.def
 
+libmsvcrt40.def: msvcrt40/msvcrt40.spec.def
+       $(RM) $@ && $(LN_S) msvcrt40/msvcrt40.spec.def $@
+libmsvcrt40.a: msvcrt40/msvcrt40.spec.def
+       $(DLLTOOL) -k -l $@ -d msvcrt40/msvcrt40.spec.def
+
+libmsvcrtd.def: msvcrtd/msvcrtd.spec.def
+       $(RM) $@ && $(LN_S) msvcrtd/msvcrtd.spec.def $@
+libmsvcrtd.a: msvcrtd/msvcrtd.spec.def
+       $(DLLTOOL) -k -l $@ -d msvcrtd/msvcrtd.spec.def
+
 libmsvfw32.def: msvideo/msvfw32.spec.def
        $(RM) $@ && $(LN_S) msvideo/msvfw32.spec.def $@
 libmsvfw32.a: msvideo/msvfw32.spec.def
        $(DLLTOOL) -k -l $@ -d msvideo/msvfw32.spec.def
 
+libmsvidc32.def: msvidc32/msvidc32.spec.def
+       $(RM) $@ && $(LN_S) msvidc32/msvidc32.spec.def $@
+libmsvidc32.a: msvidc32/msvidc32.spec.def
+       $(DLLTOOL) -k -l $@ -d msvidc32/msvidc32.spec.def
+
+libmswsock.def: mswsock/mswsock.spec.def
+       $(RM) $@ && $(LN_S) mswsock/mswsock.spec.def $@
+libmswsock.a: mswsock/mswsock.spec.def
+       $(DLLTOOL) -k -l $@ -d mswsock/mswsock.spec.def
+
 libnetapi32.def: netapi32/netapi32.spec.def
        $(RM) $@ && $(LN_S) netapi32/netapi32.spec.def $@
 libnetapi32.a: netapi32/netapi32.spec.def
        $(DLLTOOL) -k -l $@ -d netapi32/netapi32.spec.def
 
+libnewdev.def: newdev/newdev.spec.def
+       $(RM) $@ && $(LN_S) newdev/newdev.spec.def $@
+libnewdev.a: newdev/newdev.spec.def
+       $(DLLTOOL) -k -l $@ -d newdev/newdev.spec.def
+
 libntdll.def: ntdll/ntdll.spec.def
        $(RM) $@ && $(LN_S) ntdll/ntdll.spec.def $@
 libntdll.a: ntdll/ntdll.spec.def
@@ -891,6 +1279,11 @@ libole32.def: ole32/ole32.spec.def
 libole32.a: ole32/ole32.spec.def
        $(DLLTOOL) -k -l $@ -d ole32/ole32.spec.def
 
+liboleacc.def: oleacc/oleacc.spec.def
+       $(RM) $@ && $(LN_S) oleacc/oleacc.spec.def $@
+liboleacc.a: oleacc/oleacc.spec.def
+       $(DLLTOOL) -k -l $@ -d oleacc/oleacc.spec.def
+
 liboleaut32.def: oleaut32/oleaut32.spec.def
        $(RM) $@ && $(LN_S) oleaut32/oleaut32.spec.def $@
 liboleaut32.a: oleaut32/oleaut32.spec.def
@@ -951,6 +1344,11 @@ librpcrt4.def: rpcrt4/rpcrt4.spec.def
 librpcrt4.a: rpcrt4/rpcrt4.spec.def
        $(DLLTOOL) -k -l $@ -d rpcrt4/rpcrt4.spec.def
 
+librsabase.def: rsabase/rsabase.spec.def
+       $(RM) $@ && $(LN_S) rsabase/rsabase.spec.def $@
+librsabase.a: rsabase/rsabase.spec.def
+       $(DLLTOOL) -k -l $@ -d rsabase/rsabase.spec.def
+
 libserialui.def: serialui/serialui.spec.def
        $(RM) $@ && $(LN_S) serialui/serialui.spec.def $@
 libserialui.a: serialui/serialui.spec.def
@@ -1006,6 +1404,11 @@ libtwain_32.def: twain/twain_32.spec.def
 libtwain_32.a: twain/twain_32.spec.def
        $(DLLTOOL) -k -l $@ -d twain/twain_32.spec.def
 
+libunicows.def: unicows/unicows.spec.def
+       $(RM) $@ && $(LN_S) unicows/unicows.spec.def $@
+libunicows.a: unicows/unicows.spec.def
+       $(DLLTOOL) -k -l $@ -d unicows/unicows.spec.def
+
 liburl.def: url/url.spec.def
        $(RM) $@ && $(LN_S) url/url.spec.def $@
 liburl.a: url/url.spec.def
@@ -1021,6 +1424,11 @@ libuser32.def: user/user32.spec.def
 libuser32.a: user/user32.spec.def
        $(DLLTOOL) -k -l $@ -d user/user32.spec.def
 
+libuxtheme.def: uxtheme/uxtheme.spec.def
+       $(RM) $@ && $(LN_S) uxtheme/uxtheme.spec.def $@
+libuxtheme.a: uxtheme/uxtheme.spec.def
+       $(DLLTOOL) -k -l $@ -d uxtheme/uxtheme.spec.def
+
 libversion.def: version/version.spec.def
        $(RM) $@ && $(LN_S) version/version.spec.def $@
 libversion.a: version/version.spec.def
@@ -1031,6 +1439,11 @@ libw32skrnl.def: win32s/w32skrnl.spec.def
 libw32skrnl.a: win32s/w32skrnl.spec.def
        $(DLLTOOL) -k -l $@ -d win32s/w32skrnl.spec.def
 
+libwined3d.def: wined3d/wined3d.spec.def
+       $(RM) $@ && $(LN_S) wined3d/wined3d.spec.def $@
+libwined3d.a: wined3d/wined3d.spec.def
+       $(DLLTOOL) -k -l $@ -d wined3d/wined3d.spec.def
+
 libwinedos.def: winedos/winedos.spec.def
        $(RM) $@ && $(LN_S) winedos/winedos.spec.def $@
 libwinedos.a: winedos/winedos.spec.def
@@ -1100,6 +1513,8 @@ advapi32/advapi32.spec.def: $(WINEBUILD)
 avicap32/avicap32.spec.def: $(WINEBUILD)
 avifil32/avifil32.spec.def: $(WINEBUILD)
 cabinet/cabinet.spec.def: $(WINEBUILD)
+capi2032/capi2032.spec.def: $(WINEBUILD)
+cfgmgr32/cfgmgr32.spec.def: $(WINEBUILD)
 comcat/comcat.spec.def: $(WINEBUILD)
 comctl32/comctl32.spec.def: $(WINEBUILD)
 commdlg/comdlg32.spec.def: $(WINEBUILD)
@@ -1107,6 +1522,7 @@ crtdll/crtdll.spec.def: $(WINEBUILD)
 crypt32/crypt32.spec.def: $(WINEBUILD)
 ctl3d/ctl3d32.spec.def: $(WINEBUILD)
 d3d8/d3d8.spec.def: $(WINEBUILD)
+d3d9/d3d9.spec.def: $(WINEBUILD)
 d3dim/d3dim.spec.def: $(WINEBUILD)
 d3dx8/d3dx8.spec.def: $(WINEBUILD)
 dciman32/dciman32.spec.def: $(WINEBUILD)
@@ -1114,30 +1530,52 @@ ddraw/ddraw.spec.def: $(WINEBUILD)
 devenum/devenum.spec.def: $(WINEBUILD)
 dinput/dinput.spec.def: $(WINEBUILD)
 dinput8/dinput8.spec.def: $(WINEBUILD)
+dmband/dmband.spec.def: $(WINEBUILD)
+dmcompos/dmcompos.spec.def: $(WINEBUILD)
+dmime/dmime.spec.def: $(WINEBUILD)
+dmloader/dmloader.spec.def: $(WINEBUILD)
+dmscript/dmscript.spec.def: $(WINEBUILD)
+dmstyle/dmstyle.spec.def: $(WINEBUILD)
+dmsynth/dmsynth.spec.def: $(WINEBUILD)
+dmusic/dmusic.spec.def: $(WINEBUILD)
+dmusic32/dmusic32.spec.def: $(WINEBUILD)
 dplay/dplay.spec.def: $(WINEBUILD)
 dplayx/dplayx.spec.def: $(WINEBUILD)
+dpnhpast/dpnhpast.spec.def: $(WINEBUILD)
 dsound/dsound.spec.def: $(WINEBUILD)
+dswave/dswave.spec.def: $(WINEBUILD)
 gdi/gdi32.spec.def: $(WINEBUILD)
 glu32/glu32.spec.def: $(WINEBUILD)
+glut32/glut32.spec.def: $(WINEBUILD)
+iccvid/iccvid.spec.def: $(WINEBUILD)
 icmp/icmp.spec.def: $(WINEBUILD)
 imagehlp/imagehlp.spec.def: $(WINEBUILD)
 imm32/imm32.spec.def: $(WINEBUILD)
+iphlpapi/iphlpapi.spec.def: $(WINEBUILD)
 kernel/kernel32.spec.def: $(WINEBUILD)
 lzexpand/lz32.spec.def: $(WINEBUILD)
 mapi32/mapi32.spec.def: $(WINEBUILD)
 mpr/mpr.spec.def: $(WINEBUILD)
 msacm/msacm32.spec.def: $(WINEBUILD)
 msdmo/msdmo.spec.def: $(WINEBUILD)
+mshtml/mshtml.spec.def: $(WINEBUILD)
+msi/msi.spec.def: $(WINEBUILD)
 msimg32/msimg32.spec.def: $(WINEBUILD)
 msnet32/msnet32.spec.def: $(WINEBUILD)
 msvideo/msrle32/msrle32.spec.def: $(WINEBUILD)
 msvcrt/msvcrt.spec.def: $(WINEBUILD)
 msvcrt20/msvcrt20.spec.def: $(WINEBUILD)
+msvcrt40/msvcrt40.spec.def: $(WINEBUILD)
+msvcrtd/msvcrtd.spec.def: $(WINEBUILD)
 msvideo/msvfw32.spec.def: $(WINEBUILD)
+msvidc32/msvidc32.spec.def: $(WINEBUILD)
+mswsock/mswsock.spec.def: $(WINEBUILD)
 netapi32/netapi32.spec.def: $(WINEBUILD)
+newdev/newdev.spec.def: $(WINEBUILD)
 ntdll/ntdll.spec.def: $(WINEBUILD)
 odbc32/odbc32.spec.def: $(WINEBUILD)
 ole32/ole32.spec.def: $(WINEBUILD)
+oleacc/oleacc.spec.def: $(WINEBUILD)
 oleaut32/oleaut32.spec.def: $(WINEBUILD)
 olecli/olecli32.spec.def: $(WINEBUILD)
 oledlg/oledlg.spec.def: $(WINEBUILD)
@@ -1150,6 +1588,7 @@ quartz/quartz.spec.def: $(WINEBUILD)
 rasapi32/rasapi32.spec.def: $(WINEBUILD)
 richedit/riched32.spec.def: $(WINEBUILD)
 rpcrt4/rpcrt4.spec.def: $(WINEBUILD)
+rsabase/rsabase.spec.def: $(WINEBUILD)
 serialui/serialui.spec.def: $(WINEBUILD)
 setupapi/setupapi.spec.def: $(WINEBUILD)
 shdocvw/shdocvw.spec.def: $(WINEBUILD)
@@ -1161,11 +1600,14 @@ sti/sti.spec.def: $(WINEBUILD)
 tapi32/tapi32.spec.def: $(WINEBUILD)
 ttydrv/ttydrv.spec.def: $(WINEBUILD)
 twain/twain_32.spec.def: $(WINEBUILD)
+unicows/unicows.spec.def: $(WINEBUILD)
 url/url.spec.def: $(WINEBUILD)
 urlmon/urlmon.spec.def: $(WINEBUILD)
 user/user32.spec.def: $(WINEBUILD)
+uxtheme/uxtheme.spec.def: $(WINEBUILD)
 version/version.spec.def: $(WINEBUILD)
 win32s/w32skrnl.spec.def: $(WINEBUILD)
+wined3d/wined3d.spec.def: $(WINEBUILD)
 winedos/winedos.spec.def: $(WINEBUILD)
 wineps/wineps.spec.def: $(WINEBUILD)
 wininet/wininet.spec.def: $(WINEBUILD)
@@ -1180,8 +1622,8 @@ winsock/ws2_32.spec.def: $(WINEBUILD)
 wsock32/wsock32.spec.def: $(WINEBUILD)
 x11drv/x11drv.spec.def: $(WINEBUILD)
 
-$(SUBDIRS): $(IMPORT_LIBS:%=%.$(IMPLIBEXT))
-$(SUBDIRS:%=%/__crosstest__): $(IMPORT_LIBS:%=%.a)
+$(BUILDSUBDIRS): $(ALL_IMPORT_LIBS)
+$(INSTALLSUBDIRS:%=%/__install__): $(ALL_IMPORT_LIBS)
 
 # Map library name to the corresponding directory
 
@@ -1189,6 +1631,8 @@ advapi32/advapi32.dll$(DLLEXT): advapi32
 avicap32/avicap32.dll$(DLLEXT): avicap32
 avifil32/avifil32.dll$(DLLEXT): avifil32
 cabinet/cabinet.dll$(DLLEXT): cabinet
+capi2032/capi2032.dll$(DLLEXT): capi2032
+cfgmgr32/cfgmgr32.dll$(DLLEXT): cfgmgr32
 comcat/comcat.dll$(DLLEXT): comcat
 comctl32/comctl32.dll$(DLLEXT): comctl32
 commdlg/comdlg32.dll$(DLLEXT): commdlg
@@ -1196,6 +1640,7 @@ crtdll/crtdll.dll$(DLLEXT): crtdll
 crypt32/crypt32.dll$(DLLEXT): crypt32
 ctl3d/ctl3d32.dll$(DLLEXT): ctl3d
 d3d8/d3d8.dll$(DLLEXT): d3d8
+d3d9/d3d9.dll$(DLLEXT): d3d9
 d3dim/d3dim.dll$(DLLEXT): d3dim
 d3dx8/d3dx8.dll$(DLLEXT): d3dx8
 dciman32/dciman32.dll$(DLLEXT): dciman32
@@ -1203,15 +1648,29 @@ ddraw/ddraw.dll$(DLLEXT): ddraw
 devenum/devenum.dll$(DLLEXT): devenum
 dinput/dinput.dll$(DLLEXT): dinput
 dinput8/dinput8.dll$(DLLEXT): dinput8
+dmband/dmband.dll$(DLLEXT): dmband
+dmcompos/dmcompos.dll$(DLLEXT): dmcompos
+dmime/dmime.dll$(DLLEXT): dmime
+dmloader/dmloader.dll$(DLLEXT): dmloader
+dmscript/dmscript.dll$(DLLEXT): dmscript
+dmstyle/dmstyle.dll$(DLLEXT): dmstyle
+dmsynth/dmsynth.dll$(DLLEXT): dmsynth
+dmusic/dmusic.dll$(DLLEXT): dmusic
+dmusic32/dmusic32.dll$(DLLEXT): dmusic32
 dplay/dplay.dll$(DLLEXT): dplay
 dplayx/dplayx.dll$(DLLEXT): dplayx
+dpnhpast/dpnhpast.dll$(DLLEXT): dpnhpast
 dsound/dsound.dll$(DLLEXT): dsound
+dswave/dswave.dll$(DLLEXT): dswave
 gdi/gdi32.dll$(DLLEXT): gdi
 glu32/glu32.dll$(DLLEXT): glu32
+glut32/glut32.dll$(DLLEXT): glut32
+iccvid/iccvid.dll$(DLLEXT): iccvid
 icmp/icmp.dll$(DLLEXT): icmp
 msacm/imaadp32/imaadp32.acm$(DLLEXT): msacm/imaadp32
 imagehlp/imagehlp.dll$(DLLEXT): imagehlp
 imm32/imm32.dll$(DLLEXT): imm32
+iphlpapi/iphlpapi.dll$(DLLEXT): iphlpapi
 winmm/joystick/joystick.drv$(DLLEXT): winmm/joystick
 kernel/kernel32.dll$(DLLEXT): kernel
 lzexpand/lz32.dll$(DLLEXT): lzexpand
@@ -1228,17 +1687,25 @@ msacm/msacm32.dll$(DLLEXT): msacm
 msacm/msadp32/msadp32.acm$(DLLEXT): msacm/msadp32
 msdmo/msdmo.dll$(DLLEXT): msdmo
 msacm/msg711/msg711.acm$(DLLEXT): msacm/msg711
+mshtml/mshtml.dll$(DLLEXT): mshtml
+msi/msi.dll$(DLLEXT): msi
 msimg32/msimg32.dll$(DLLEXT): msimg32
 msisys/msisys.ocx$(DLLEXT): msisys
 msnet32/msnet32.dll$(DLLEXT): msnet32
 msvideo/msrle32/msrle32.dll$(DLLEXT): msvideo/msrle32
 msvcrt/msvcrt.dll$(DLLEXT): msvcrt
 msvcrt20/msvcrt20.dll$(DLLEXT): msvcrt20
+msvcrt40/msvcrt40.dll$(DLLEXT): msvcrt40
+msvcrtd/msvcrtd.dll$(DLLEXT): msvcrtd
 msvideo/msvfw32.dll$(DLLEXT): msvideo
+msvidc32/msvidc32.dll$(DLLEXT): msvidc32
+mswsock/mswsock.dll$(DLLEXT): mswsock
 netapi32/netapi32.dll$(DLLEXT): netapi32
+newdev/newdev.dll$(DLLEXT): newdev
 ntdll/ntdll.dll$(DLLEXT): ntdll
 odbc32/odbc32.dll$(DLLEXT): odbc32
 ole32/ole32.dll$(DLLEXT): ole32
+oleacc/oleacc.dll$(DLLEXT): oleacc
 oleaut32/oleaut32.dll$(DLLEXT): oleaut32
 olecli/olecli32.dll$(DLLEXT): olecli
 oledlg/oledlg.dll$(DLLEXT): oledlg
@@ -1251,6 +1718,7 @@ quartz/quartz.dll$(DLLEXT): quartz
 rasapi32/rasapi32.dll$(DLLEXT): rasapi32
 richedit/riched32.dll$(DLLEXT): richedit
 rpcrt4/rpcrt4.dll$(DLLEXT): rpcrt4
+rsabase/rsabase.dll$(DLLEXT): rsabase
 serialui/serialui.dll$(DLLEXT): serialui
 setupapi/setupapi.dll$(DLLEXT): setupapi
 shdocvw/shdocvw.dll$(DLLEXT): shdocvw
@@ -1262,14 +1730,17 @@ sti/sti.dll$(DLLEXT): sti
 tapi32/tapi32.dll$(DLLEXT): tapi32
 ttydrv/ttydrv.dll$(DLLEXT): ttydrv
 twain/twain_32.dll$(DLLEXT): twain
+unicows/unicows.dll$(DLLEXT): unicows
 url/url.dll$(DLLEXT): url
 urlmon/urlmon.dll$(DLLEXT): urlmon
 user/user32.dll$(DLLEXT): user
+uxtheme/uxtheme.dll$(DLLEXT): uxtheme
 version/version.dll$(DLLEXT): version
 win32s/w32skrnl.dll$(DLLEXT): win32s
 winmm/winealsa/winealsa.drv$(DLLEXT): winmm/winealsa
 winmm/winearts/winearts.drv$(DLLEXT): winmm/winearts
 winmm/wineaudioio/wineaudioio.drv$(DLLEXT): winmm/wineaudioio
+wined3d/wined3d.dll$(DLLEXT): wined3d
 winedos/winedos.dll$(DLLEXT): winedos
 winmm/winejack/winejack.drv$(DLLEXT): winmm/winejack
 msacm/winemp3/winemp3.acm$(DLLEXT): msacm/winemp3
@@ -1287,147 +1758,44 @@ wow32/wow32.dll$(DLLEXT): wow32
 winsock/ws2_32.dll$(DLLEXT): winsock
 wsock32/wsock32.dll$(DLLEXT): wsock32
 x11drv/x11drv.dll$(DLLEXT): x11drv
+dxguid/libdxguid.a: dxguid
+uuid/libuuid.a: uuid
 
-# Install dependencies
-
-advapi32/__install__: advapi32.dll$(DLLEXT)
-avicap32/__install__: avicap32.dll$(DLLEXT)
-avifil32/__install__: avifil32.dll$(DLLEXT)
-cabinet/__install__: cabinet.dll$(DLLEXT)
-comcat/__install__: comcat.dll$(DLLEXT)
-comctl32/__install__: comctl32.dll$(DLLEXT)
-commdlg/__install__: comdlg32.dll$(DLLEXT)
-crtdll/__install__: crtdll.dll$(DLLEXT)
-crypt32/__install__: crypt32.dll$(DLLEXT)
-ctl3d/__install__: ctl3d32.dll$(DLLEXT)
-d3d8/__install__: d3d8.dll$(DLLEXT)
-d3dim/__install__: d3dim.dll$(DLLEXT)
-d3dx8/__install__: d3dx8.dll$(DLLEXT)
-dciman32/__install__: dciman32.dll$(DLLEXT)
-ddraw/__install__: ddraw.dll$(DLLEXT)
-devenum/__install__: devenum.dll$(DLLEXT)
-dinput/__install__: dinput.dll$(DLLEXT)
-dinput8/__install__: dinput8.dll$(DLLEXT)
-dplay/__install__: dplay.dll$(DLLEXT)
-dplayx/__install__: dplayx.dll$(DLLEXT)
-dsound/__install__: dsound.dll$(DLLEXT)
-gdi/__install__: gdi32.dll$(DLLEXT)
-glu32/__install__: glu32.dll$(DLLEXT)
-icmp/__install__: icmp.dll$(DLLEXT)
-msacm/imaadp32/__install__: imaadp32.acm$(DLLEXT)
-imagehlp/__install__: imagehlp.dll$(DLLEXT)
-imm32/__install__: imm32.dll$(DLLEXT)
-winmm/joystick/__install__: joystick.drv$(DLLEXT)
-kernel/__install__: kernel32.dll$(DLLEXT)
-lzexpand/__install__: lz32.dll$(DLLEXT)
-mapi32/__install__: mapi32.dll$(DLLEXT)
-winmm/mcianim/__install__: mcianim.drv$(DLLEXT)
-winmm/mciavi/__install__: mciavi.drv$(DLLEXT)
-winmm/mcicda/__install__: mcicda.drv$(DLLEXT)
-winmm/mciseq/__install__: mciseq.drv$(DLLEXT)
-winmm/mciwave/__install__: mciwave.drv$(DLLEXT)
-winmm/midimap/__install__: midimap.drv$(DLLEXT)
-mpr/__install__: mpr.dll$(DLLEXT)
-winmm/wavemap/__install__: msacm.drv$(DLLEXT)
-msacm/__install__: msacm32.dll$(DLLEXT)
-msacm/msadp32/__install__: msadp32.acm$(DLLEXT)
-msdmo/__install__: msdmo.dll$(DLLEXT)
-msacm/msg711/__install__: msg711.acm$(DLLEXT)
-msimg32/__install__: msimg32.dll$(DLLEXT)
-msisys/__install__: msisys.ocx$(DLLEXT)
-msnet32/__install__: msnet32.dll$(DLLEXT)
-msvideo/msrle32/__install__: msrle32.dll$(DLLEXT)
-msvcrt/__install__: msvcrt.dll$(DLLEXT)
-msvcrt20/__install__: msvcrt20.dll$(DLLEXT)
-msvideo/__install__: msvfw32.dll$(DLLEXT)
-netapi32/__install__: netapi32.dll$(DLLEXT)
-ntdll/__install__: ntdll.dll$(DLLEXT)
-odbc32/__install__: odbc32.dll$(DLLEXT)
-ole32/__install__: ole32.dll$(DLLEXT)
-oleaut32/__install__: oleaut32.dll$(DLLEXT)
-olecli/__install__: olecli32.dll$(DLLEXT)
-oledlg/__install__: oledlg.dll$(DLLEXT)
-olepro32/__install__: olepro32.dll$(DLLEXT)
-olesvr/__install__: olesvr32.dll$(DLLEXT)
-opengl32/__install__: opengl32.dll$(DLLEXT)
-psapi/__install__: psapi.dll$(DLLEXT)
-qcap/__install__: qcap.dll$(DLLEXT)
-quartz/__install__: quartz.dll$(DLLEXT)
-rasapi32/__install__: rasapi32.dll$(DLLEXT)
-richedit/__install__: riched32.dll$(DLLEXT)
-rpcrt4/__install__: rpcrt4.dll$(DLLEXT)
-serialui/__install__: serialui.dll$(DLLEXT)
-setupapi/__install__: setupapi.dll$(DLLEXT)
-shdocvw/__install__: shdocvw.dll$(DLLEXT)
-shell32/__install__: shell32.dll$(DLLEXT)
-shfolder/__install__: shfolder.dll$(DLLEXT)
-shlwapi/__install__: shlwapi.dll$(DLLEXT)
-snmpapi/__install__: snmpapi.dll$(DLLEXT)
-sti/__install__: sti.dll$(DLLEXT)
-tapi32/__install__: tapi32.dll$(DLLEXT)
-ttydrv/__install__: ttydrv.dll$(DLLEXT)
-twain/__install__: twain_32.dll$(DLLEXT)
-url/__install__: url.dll$(DLLEXT)
-urlmon/__install__: urlmon.dll$(DLLEXT)
-user/__install__: user32.dll$(DLLEXT)
-version/__install__: version.dll$(DLLEXT)
-win32s/__install__: w32skrnl.dll$(DLLEXT)
-winmm/winealsa/__install__: winealsa.drv$(DLLEXT)
-winmm/winearts/__install__: winearts.drv$(DLLEXT)
-winmm/wineaudioio/__install__: wineaudioio.drv$(DLLEXT)
-winedos/__install__: winedos.dll$(DLLEXT)
-winmm/winejack/__install__: winejack.drv$(DLLEXT)
-msacm/winemp3/__install__: winemp3.acm$(DLLEXT)
-winmm/winenas/__install__: winenas.drv$(DLLEXT)
-winmm/wineoss/__install__: wineoss.drv$(DLLEXT)
-wineps/__install__: wineps.dll$(DLLEXT)
-wininet/__install__: wininet.dll$(DLLEXT)
-winmm/__install__: winmm.dll$(DLLEXT)
-winnls/__install__: winnls32.dll$(DLLEXT)
-winspool/__install__: winspool.drv$(DLLEXT)
-wintab32/__install__: wintab32.dll$(DLLEXT)
-wintrust/__install__: wintrust.dll$(DLLEXT)
-winaspi/__install__: wnaspi32.dll$(DLLEXT)
-wow32/__install__: wow32.dll$(DLLEXT)
-winsock/__install__: ws2_32.dll$(DLLEXT)
-wsock32/__install__: wsock32.dll$(DLLEXT)
-x11drv/__install__: x11drv.dll$(DLLEXT)
-
-# Special targets for dlls that we need to link to
-
-LINKABLE_DLLS = ntdll.dll
-
-libntdll.dll.$(LIBEXT): ntdll/ntdll.dll$(DLLEXT)
-       $(RM) $@ && $(LN_S) ntdll/ntdll.dll$(DLLEXT) $@
+# Rules for auto documentation
 
-kernel: libntdll.dll.$(LIBEXT)
+$(SUBDIRS:%=%/__man__): dummy
+       cd `dirname $@` && $(MAKE) man
 
-uninstall::
-       $(RM) $(LINKABLE_DLLS:%=$(libdir)/lib%.$(LIBEXT))
+man: $(SUBDIRS:%=%/__man__)
 
-install install-lib::
-       $(RM) $(LINKABLE_DLLS:%=$(libdir)/lib%.$(LIBEXT))
-       cd $(libdir) && if [ "$(dlldir)" = "$(libdir)/wine" ]; \
-       then \
-         $(LN_S) wine/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \
-       else \
-         $(LN_S) $(dlldir)/ntdll.dll$(DLLEXT) libntdll.dll.$(LIBEXT); \
-       fi
+$(SUBDIRS:%=%/__doc_html__): dummy
+       cd `dirname $@` && $(MAKE) doc-html
+
+doc-html: $(SUBDIRS:%=%/__doc_html__)
+
+$(SUBDIRS:%=%/__doc_sgml__): dummy
+       cd `dirname $@` && $(MAKE) doc-sgml
+
+doc-sgml: $(SUBDIRS:%=%/__doc_sgml__)
+
+.PHONY: man doc-html doc-sgml implib $(SUBDIRS:%=%/__man__) $(SUBDIRS:%=%/__doc_html__) $(SUBDIRS:%=%/__doc_sgml__)
 
 # Misc rules
 
-install install-dev:: $(IMPORT_LIBS:%=%.$(IMPLIBEXT))
+install install-dev:: $(ALL_IMPORT_LIBS)
        $(MKINSTALLDIRS) $(dlldir)
-       for f in $(IMPORT_LIBS:%=%.$(IMPLIBEXT)); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done
+       for f in $(ALL_IMPORT_LIBS); do $(INSTALL_DATA) $$f $(dlldir)/$$f; done
 
 install install-lib:: $(INSTALLSUBDIRS:%=%/__install__)
 
 uninstall::
-       $(RM) $(IMPORT_LIBS:%=$(dlldir)/%.$(IMPLIBEXT))
+       $(RM) $(ALL_IMPORT_LIBS:%=$(dlldir)/%)
        -rmdir $(dlldir)
 
+implib: $(ALL_IMPORT_LIBS)
+
 clean::
-       $(RM) $(IMPORT_LIBS:%=%.a) $(IMPORT_LIBS:%=%.def)
+       $(RM) $(ALL_IMPORT_LIBS) $(SYMLINKS)
 
 check test:: $(BUILDSUBDIRS:%=%/__test__)