+# 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
+
+#----------------------------------------------------------------------
+# MSLU == Microsoft Layer for Unicode
+# See MSDN or the Platform SDK docs for details
+!if "$(MSLU)" == "1"
+MSLU_FLAGS=/nod:kernel32.lib /nod:advapi32.lib /nod:user32.lib /nod:gdi32.lib /nod:shell32.lib /nod:comdlg32.lib /nod:version.lib /nod:mpr.lib /nod:rasapi32.lib /nod:winmm.lib /nod:winspool.lib /nod:vfw32.lib /nod:secur32.lib /nod:oleacc.lib /nod:oledlg.lib /nod:sensapi.lib
+MSLU_LIBS=$(MSLU_FLAGS) unicows.lib
+!endif
+
+WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
+
+!if "$(wxUSE_GUI)" == "0"
+INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/base$(INCEXT)
+!else
+INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT)
+!endif
+
+INC=$(INCTEMP) -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 = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
+!else
+LIBS = $(MSLU_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
+