+# This sets 'D' to a suitable directory name
+# for this kind of build, and WXLIBNAME to one of wx (static release), wxd (static debug),
+# wx$(WXVERSION) (DLL release), wx$(WXVERSION)d (DLL debug)
+
+!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
+WXLIBNAME=wxmsw$(WXVERSION)
+!else
+WXLIBNAME=wxmsw
+!endif
+
+!if "$(NEW_WXLIBNAME)" != ""
+WXLIBNAME=$(NEW_WXLIBNAME)
+!endif
+
+!if "$(UNICODE)" == "1"
+UNIEXT=u
+WXLIBNAME=$(WXLIBNAME)$(UNIEXT)
+!endif
+
+!if "$(FINAL)" == "1"
+D=Release
+!else if "$(FINAL)" == "hybrid"
+D=Hybrid
+LIBEXT=h
+WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
+!else
+guilibsdll= oldnames.lib kernel32.lib \
+ ws2_32.lib mswsock.lib advapi32.lib user32.lib \
+ gdi32.lib comdlg32.lib winspool.lib
+D=Debug
+LIBEXT=d
+WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
+!endif
+
+!if "$(wxUSE_GUI)" == "0"
+WXLIBNAME=wxBase
+D=Base$(D)
+WXLIBNAME=$(WXLIBNAME)$(UNIEXT)$(LIBEXT)
+!endif
+
+!if "$(UNICODE)" == "1"
+D=$(D)Unicode
+!endif
+
+INCEXT=$(UNIEXT)$(LIBEXT)
+
+!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
+D=$(D)DLL
+INCEXT=dll$(INCEXT)
+!endif
+
+WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
+
+INC=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT) -I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/regex -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/tiff
+
+!if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
+LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
+!else
+LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib
+!endif
+