From ca5c8b2df6ab651c791d43fbfebe005dbb0add40 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Wed, 17 Feb 1999 17:18:22 +0000
Subject: [PATCH] Changed .vc makefiles to allow different configurations to
 co-exist (so library names have changed a bit). Split ipvaddr.tex from
 sckaddr.tex.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 distrib/msw/bc.rsp                       |    2 +
 distrib/msw/zipdist.bat                  |    3 +
 docs/changes.txt                         |    3 +
 docs/latex/wx/classes.tex                |   15 +-
 docs/latex/wx/ipvaddr.tex                |   95 ++
 docs/latex/wx/sckaddr.tex                |   95 --
 docs/motif/install.txt                   |    3 +
 docs/msw/install.txt                     |   55 +-
 src/makevc.env                           |   47 +-
 src/msw/app.cpp                          |    3 +-
 src/msw/makefile.vc                      | 1473 +++++-----------------
 src/png/makefile.vc                      |    2 -
 src/xpm/makefile.vc                      |   10 -
 utils/nplugin/samples/gui/makefile.vc    |    4 +-
 utils/nplugin/samples/simple/makefile.vc |    4 +-
 15 files changed, 501 insertions(+), 1313 deletions(-)
 create mode 100644 distrib/msw/bc.rsp
 create mode 100644 docs/latex/wx/ipvaddr.tex

diff --git a/distrib/msw/bc.rsp b/distrib/msw/bc.rsp
new file mode 100644
index 0000000000..6388546049
--- /dev/null
+++ b/distrib/msw/bc.rsp
@@ -0,0 +1,2 @@
+src/bc32.ide
+samples/bc32.ide
diff --git a/distrib/msw/zipdist.bat b/distrib/msw/zipdist.bat
index 3fbd6ac1b0..d4844441e0 100755
--- a/distrib/msw/zipdist.bat
+++ b/distrib/msw/zipdist.bat
@@ -34,6 +34,9 @@ zip32 -@ %dest\wx200wrd.zip < %src\distrib\msw\wx_word.rsp
 rem VC++ project files
 zip32 -@ %dest\wx200vc.zip < %src\distrib\msw\vc.rsp
 
+rem BC++ project files
+zip32 -@ %dest\wx200bc.zip < %src\distrib\msw\bc.rsp
+
 rem CodeWarrior project files
 zip32 -@ %dest\wx200cw.zip < %src\distrib\msw\cw.rsp
 
diff --git a/docs/changes.txt b/docs/changes.txt
index d204172b50..bc1f9c5111 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -11,6 +11,9 @@ wxMSW:
 
 - Fixed wxWindow::IsShown (::IsWindowVisible doesn't behave as
   expected).
+- Changed VC++ makefiles (.vc) so that it's possible to have
+  debug/release/DLL versions of the library available simultaneously,
+  with names wx.lib, wx_d.lib, wx200.lib(dll), wx200_d.lib(dll).
 
 wxMotif:
 
diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex
index 43b4159d53..62c531d4ff 100644
--- a/docs/latex/wx/classes.tex
+++ b/docs/latex/wx/classes.tex
@@ -69,13 +69,13 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input debugcxt.tex
 \input dialog.tex
 \input dirdlg.tex
-\input document.tex
 \input docchfrm.tex
 \input docmanag.tex
 \input docmdich.tex
 \input docmdipr.tex
 \input docprfrm.tex
 \input doctempl.tex
+\input document.tex
 \input dropevt.tex
 \input dropsrc.tex
 \input droptrgt.tex
@@ -88,8 +88,8 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input filedlg.tex
 \input fildrptg.tex
 \input filehist.tex
-\input filetype.tex
 \input strmfile.tex
+\input filetype.tex
 \input fltinstr.tex
 \input fltoutst.tex
 \input focusevt.tex
@@ -111,6 +111,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input ilayout.tex
 \input indlgevt.tex
 \input inputstr.tex
+\input ipvaddr.tex
 \input joystick.tex
 \input joyevent.tex
 \input keyevent.tex
@@ -124,10 +125,12 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input log.tex
 \input mask.tex
 \input mdi.tex
+\input memorydc.tex
+\input strmmem.tex
 \input menu.tex
 \input menuitem.tex
 \input menuevt.tex
-\input memorydc.tex
+\input msgdlg.tex
 \input metafile.tex
 \input mimetype.tex
 \input minifram.tex
@@ -135,7 +138,6 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input mouseevt.tex
 \input moveevt.tex
 \input mltchdlg.tex
-\input msgdlg.tex
 \input mutex.tex
 \input mutexlck.tex
 \input node.tex
@@ -193,22 +195,21 @@ $$\image{14cm;0cm}{wxclass.ps}$$
 \input tokenizr.tex
 \input strmbase.tex
 \input stream.tex
-\input strmmem.tex
 \input sysclevt.tex
 \input settings.tex
 \input tab.tex
 \input tabctrl.tex
 \input tabevent.tex
 \input taskbar.tex
+\input tempfile.tex
 \input text.tex
+\input txtdatob.tex
 \input textdlg.tex
 \input txtdrptg.tex
 \input valtext.tex
-\input tempfile.tex
 \input tcpclint.tex
 \input tcpconn.tex
 \input tcpservr.tex
-\input txtdatob.tex
 \input textfile.tex
 \input thread.tex
 \input time.tex
diff --git a/docs/latex/wx/ipvaddr.tex b/docs/latex/wx/ipvaddr.tex
new file mode 100644
index 0000000000..07ae2e0a74
--- /dev/null
+++ b/docs/latex/wx/ipvaddr.tex
@@ -0,0 +1,95 @@
+% ----------------------------------------------------------------------------
+% CLASS: wxIPV4address
+% ----------------------------------------------------------------------------
+\section{\class{wxIPV4address}}\label{wxipv4address}
+
+\wxheading{Derived from}
+
+\helpref{wxSockAddress}{wxsockaddress}
+
+\wxheading{Include files}
+
+<wx/socket.h>
+
+% ----------------------------------------------------------------------------
+% MEMBERS
+% ----------------------------------------------------------------------------
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+%
+% Hostname
+%
+
+\membersection{wxIPV4address::Hostname}
+
+\func{bool}{Hostname}{\param{const wxString\&}{ hostname}}
+
+Use the specified {\it hostname} for the address.
+
+\wxheading{Return value}
+
+Returns FALSE if something bad happens (invalid hostname, invalid IP address). 
+
+%
+% Hostname
+%
+
+\membersection{wxIPV4address::Hostname}
+
+\func{wxString}{Hostname}{\void}
+
+Returns the hostname which matches the IP address.
+
+%
+% Service
+%
+
+\membersection{wxIPV4address::Service}
+
+\func{bool}{Service}{\param{const wxString\&}{ service}}
+
+Use the specified {\it service} string for the address.
+
+\wxheading{Return value}
+
+Returns FALSE if something bad happens (invalid service).
+
+%
+% Service
+%
+
+\membersection{wxIPV4address::Service}
+
+\func{bool}{Service}{\param{unsigned short}{ service}}
+
+Use the specified {\it service} for the address.
+
+\wxheading{Return value}
+
+Returns FALSE if something bad happens (invalid service).
+
+%
+% Service
+%
+
+\membersection{wxIPV4address::Service}
+
+\func{unsigned short}{Service}{\void}
+
+Returns the current service.
+
+%
+% LocalHost
+%
+
+\membersection{wxIPV4address::LocalHost}
+
+\func{bool}{LocalHost}{\void}
+
+Initialize peer host to local host.
+
+\wxheading{Return value}
+
+Returns FALSE if something bad happens.
+
diff --git a/docs/latex/wx/sckaddr.tex b/docs/latex/wx/sckaddr.tex
index e101799615..f356aecb76 100644
--- a/docs/latex/wx/sckaddr.tex
+++ b/docs/latex/wx/sckaddr.tex
@@ -78,98 +78,3 @@ function: only wxSocketBase use it.}
 
 Returns the length of the socket address.
 
-% ----------------------------------------------------------------------------
-% CLASS: wxIPV4address
-% ----------------------------------------------------------------------------
-\section{\class{wxIPV4address}}\label{wxipv4address}
-
-\wxheading{Derived from}
-
-\helpref{wxSockAddress}{wxsockaddress}
-
-\wxheading{Include files}
-
-<wx/socket.h>
-
-% ----------------------------------------------------------------------------
-% MEMBERS
-% ----------------------------------------------------------------------------
-
-\latexignore{\rtfignore{\wxheading{Members}}}
-
-%
-% Hostname
-%
-
-\membersection{wxIPV4address::Hostname}
-
-\func{bool}{Hostname}{\param{const wxString\&}{ hostname}}
-
-Use the specified {\it hostname} for the address.
-
-\wxheading{Return value}
-
-Returns FALSE if something bad happens (invalid hostname, invalid IP address). 
-
-%
-% Hostname
-%
-
-\membersection{wxIPV4address::Hostname}
-
-\func{wxString}{Hostname}{\void}
-
-Returns the hostname which matches the IP address.
-
-%
-% Service
-%
-
-\membersection{wxIPV4address::Service}
-
-\func{bool}{Service}{\param{const wxString\&}{ service}}
-
-Use the specified {\it service} string for the address.
-
-\wxheading{Return value}
-
-Returns FALSE if something bad happens (invalid service).
-
-%
-% Service
-%
-
-\membersection{wxIPV4address::Service}
-
-\func{bool}{Service}{\param{unsigned short}{ service}}
-
-Use the specified {\it service} for the address.
-
-\wxheading{Return value}
-
-Returns FALSE if something bad happens (invalid service).
-
-%
-% Service
-%
-
-\membersection{wxIPV4address::Service}
-
-\func{unsigned short}{Service}{\void}
-
-Returns the current service.
-
-%
-% LocalHost
-%
-
-\membersection{wxIPV4address::LocalHost}
-
-\func{bool}{LocalHost}{\void}
-
-Initialize peer host to local host.
-
-\wxheading{Return value}
-
-Returns FALSE if something bad happens.
-
diff --git a/docs/motif/install.txt b/docs/motif/install.txt
index 8f39f650df..1e4e0a68a2 100644
--- a/docs/motif/install.txt
+++ b/docs/motif/install.txt
@@ -122,6 +122,9 @@ Troubleshooting
   of string arrays), set wxUSE_GLOBAL_MEMORY_OPERATORS to 0 in
   setup.h, and recompile.
 
+- If you get an internal compiler error in gcc, turn off
+  optimisations.
+
 - Problems with XtDestroyWidget crashing in ~wxWindow have been
   reported on SGI IRIX 6.4. This has not yet been resolved, so
   any advice here would be very welcome. See bugs.txt for a
diff --git a/docs/msw/install.txt b/docs/msw/install.txt
index 2263c5bc0c..051643dd94 100644
--- a/docs/msw/install.txt
+++ b/docs/msw/install.txt
@@ -71,23 +71,48 @@ Using project files:
 Using makefiles:
 
 1. Make sure your WXWIN variable is set.
-2. Change directory to wx\src\msw. Type 'nmake -f makefile.vc' to
-   make the wxWindows core library.
+2. Change directory to wx\src\msw. Type:
+
+  'nmake -f makefile.vc'
+
+   to make the wxWindows core library with debug information
+   (wx\lib\wx_d.lib), or
+
+  'nmake -f makefile.vc FINAL=1'
+
+   to make the wxWindows core library without debug information
+   (wx\lib\wx.lib).
+
 3. Change directory to wx\samples and type 'nmake -f makefile.vc'
    to make all the samples. You can also make them individually.
 
-To build the release version using makefiles, add FINAL=1 to your
-nmake invocation, both when building the library and for samples.
+Notes:
 
-Use the 'clean' target to clean all objects, libraries and
-executables.
+  Use the 'clean' target to clean all objects, libraries and
+  executables.
+
+  To build the release version using makefiles, add FINAL=1 to your
+  nmake invocation, both when building the library and for samples.
+
+  Note that the wxWindows core library allows you to have debug
+  and release libraries available simultaneously, by compiling the
+  objects in different subdirectories, whereas samples must be
+  cleaned and re-made to build a different configuration. This
+  may be changed in later versions of wxWindows.
 
 To build the DLL version using makefiles:
 
 1. Change directory to wx\src\msw. Type 'nmake -f makefile.vc dll pch'
    to make both a suitable DLL and import library, and to build a
    suitable precompiled header file for compiling applications.
-2. Invoke a sample makefile with 'nmake -f makefile.vc WXUSINGDLL=1'.
+   The resulting libraries are called:
+
+      wx\lib\wx200_d.lib(dll) (debug version)
+      wx\lib\wx200.lib(dll)   (release version, using FINAL=1)
+
+2. Invoke a sample makefile with 'nmake -f makefile.vc WXUSINGDLL=1'
+   (or edit src\makeprog.vc to set WXUSINGDLL to 1 for all
+   applications).
 
 Note (1): if you wish to use templates, please edit
 include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0.
@@ -130,6 +155,8 @@ executables.
 Borland C++ 4.5/5.0 compilation
 -------------------------------
 
+Compiling using the makefiles:
+
 1. Make sure your WXWIN variable is set, and uses the FAT (short
    name) form if doing a 16-bit compile.
 2. Change directory to wx\src\msw. Type 'make -f makefile.b32' to
@@ -146,6 +173,20 @@ Note: the wxWindows library and (some) samples compile in 16-bit mode
 using makefile.bcc, but at present the wxWindows resource system is switched
 off in this mode. See issues.txt for details.
 
+Compiling using the IDE files:
+
+1. Load src\wxwin32_lib.ide.
+2. Go to Options|Project... and specify the correct BC++ include and lib path for
+   your file structure.
+3. Press F9 to compile the wxWindows library.
+4. Load samples\samples.ide.
+5. Go to Options|Project... and specify the correct BC++ include and lib path for
+   your file structure.
+6. Press F9 to compile the samples.
+
+See also the file bc_ide.txt for further instructions and details
+of how to create your own project files.
+
 Borland C++Builder compilation
 ------------------------------
 
diff --git a/src/makevc.env b/src/makevc.env
index 773d9ae719..a7ee453187 100644
--- a/src/makevc.env
+++ b/src/makevc.env
@@ -77,12 +77,6 @@ WXBASESRC=$(WXDIR)\src\common
 
 #DLL=0
 
-!if "$(WXUSINGDLL)" == "1" || "$(WXMAKINGDLL)" == "1"
-WXLIB=$(WXDIR)\lib\wx200.lib
-!else
-WXLIB=$(WXDIR)\lib\wx.lib
-!endif
-
 !if "$(WXUSINGDLL)" == "1"
 EXTRADLLFLAGS=/DWXUSINGDLL=1
 !endif
@@ -99,9 +93,6 @@ EXTRADLLFLAGS=
 EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
 !endif
 
-INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(EXTRAINC)
-LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\xpm.lib
-
 !ifndef FINAL
 FINAL=0
 DEBUG=1
@@ -116,6 +107,32 @@ DLL=0
 NOPCH=0
 !endif
 
+# This sets 'D' to a suitable directory name
+# for this kind of build, and WXLIBNAME to one of wx (static release), wx_d (static debug),
+# wx200 (DLL release), wx200_d (DLL debug)
+
+!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
+WXLIBNAME=wx200
+!else
+WXLIBNAME=wx
+!endif
+
+!if "$(FINAL)" == "1"
+D=Release
+!else
+D=Debug
+WXLIBNAME=$(WXLIBNAME)_d
+!endif
+
+!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
+D=$(D)DLL
+!endif
+
+WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
+
+INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(EXTRAINC)
+LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\xpm.lib
+
 MAKEPRECOMP=/YcWX/WXPREC.H
 OPTIONS=
 
@@ -141,8 +158,8 @@ PCH=
 PRECOMP=
 MAKEPRECOMP=
 !else
-PCH=WX.PCH
-PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb
+PCH=$(WXLIBNAME).pch
+PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
 MAKEPRECOMP=/YcWX/WXPREC.H
 !endif
 
@@ -155,18 +172,18 @@ DUMMY=dummy
 !else
 
 !if "$(WXMAKINGDLL)" == "1"
-PCH=WXDLL.PCH
+PCH=$(WXLIBNAME).pch
 DUMMY=dummydll
 !else
-PCH=WX.PCH
+PCH=$(WXLIBNAME).pch
 DUMMY=dummy
 !endif
 
-PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb
+PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
 LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
 !endif
 
-DUMMYOBJ=$(WXDIR)\src\msw\$(DUMMY).obj
+DUMMYOBJ=$(WXDIR)\src\msw\$D\$(DUMMY).obj
 
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 134f594a65..16b58ba2f9 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -378,7 +378,8 @@ void wxApp::ConvertToStandardCommandArgs(char* lpCmdLine)
     ::GetModuleFileName(wxhInstance, name, WXSIZEOF(name));
 
     // GNUWIN32 already fills in the first arg with the application name.
-#if !defined(__GNUWIN32__)
+    // JACS: apparently not now (b20 and above?)
+#if 0 // !defined(__GNUWIN32__)
     args.Add(name);
     count ++;
 #endif
diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc
index 365acc54da..c74ab9cf24 100644
--- a/src/msw/makefile.vc
+++ b/src/msw/makefile.vc
@@ -12,18 +12,17 @@
 #
 # FINAL=1 argument to nmake to build version with no debugging info.
 # dll builds a library (wxdll.lib) suitable for creating DLLs
-#    * Note that the dll target is experimental - see docs/dll.txt.
 #
 !include <..\makevc.env>
 
 THISDIR=$(WXWIN)\src\msw
 
 !if "$(WXMAKINGDLL)" == "1"
-LIBTARGET=$(WXDIR)\lib\wx200.dll
-DUMMYOBJ=dummydll.obj
+LIBTARGET=$(WXDIR)\lib\$(WXLIBNAME).dll
+DUMMYOBJ=$D\dummydll.obj
 !else
 LIBTARGET=$(WXLIB)
-DUMMYOBJ=dummy.obj
+DUMMYOBJ=$D\dummy.obj
 !endif
 
 # Please set these according to the settings in wx_setup.h, so we can include
@@ -42,1173 +41,340 @@ PERIPH_CLEAN_TARGET=
 # error to load that file.
 GENDIR=$(WXDIR)\src\generic
 COMMDIR=$(WXDIR)\src\common
-XPMDIR=$(WXDIR)\src\xpm
 OLEDIR=ole
 MSWDIR=$(WXDIR)\src\msw
+DOCDIR = $(WXDIR)\docs
 
-DOCDIR = $(WXDIR)\docs
-
-GENERICOBJS= \
-  $(GENDIR)\choicdgg.obj \
-  $(GENDIR)\gridg.obj \
-  $(GENDIR)\laywin.obj \
-  $(GENDIR)\panelg.obj \
-  $(GENDIR)\prop.obj \
-  $(GENDIR)\propform.obj \
-  $(GENDIR)\proplist.obj \
-  $(GENDIR)\sashwin.obj \
-  $(GENDIR)\scrolwin.obj \
-  $(GENDIR)\splitter.obj \
-  $(GENDIR)\statusbr.obj \
-  $(GENDIR)\tabg.obj \
-  $(GENDIR)\textdlgg.obj
-
-#  $(GENDIR)\imaglist.obj \
-#  $(GENDIR)\treectrl.obj \
-#  $(GENDIR)\listctrl.obj \
-#  $(GENDIR)\notebook.obj \
-
-# These are generic things that don't need to be compiled on MSW,
-# but sometimes it's useful to do so for testing purposes.
-NONESSENTIALOBJS= \
-  $(GENDIR)\printps.obj \
-  $(GENDIR)\prntdlgg.obj \
-  $(GENDIR)\msgdlgg.obj \
-  $(GENDIR)\helpxlp.obj \
-  $(GENDIR)\colrdlgg.obj \
-  $(GENDIR)\fontdlgg.obj
-
-COMMONOBJS = \
-  $(COMMDIR)\cmndata.obj \
-  $(COMMDIR)\config.obj \
-  $(COMMDIR)\db.obj \
-  $(COMMDIR)\dbtable.obj \
-  $(COMMDIR)\docview.obj \
-  $(COMMDIR)\docmdi.obj \
-  $(COMMDIR)\dynarray.obj \
-  $(COMMDIR)\dynlib.obj \
-  $(COMMDIR)\event.obj \
-  $(COMMDIR)\file.obj \
-  $(COMMDIR)\filefn.obj \
-  $(COMMDIR)\fileconf.obj \
-  $(COMMDIR)\framecmn.obj \
-  $(COMMDIR)\ftp.obj \
-  $(COMMDIR)\gdicmn.obj \
-  $(COMMDIR)\image.obj \
-  $(COMMDIR)\intl.obj \
-  $(COMMDIR)\ipcbase.obj \
-  $(COMMDIR)\helpbase.obj \
-  $(COMMDIR)\layout.obj \
-  $(COMMDIR)\log.obj \
-  $(COMMDIR)\memory.obj \
-  $(COMMDIR)\mimetype.obj \
-  $(COMMDIR)\module.obj \
-  $(COMMDIR)\odbc.obj \
-  $(COMMDIR)\object.obj \
-  $(COMMDIR)\prntbase.obj \
-  $(COMMDIR)\resource.obj \
-  $(COMMDIR)\tbarbase.obj \
-  $(COMMDIR)\tbarsmpl.obj \
-  $(COMMDIR)\textfile.obj \
-  $(COMMDIR)\timercmn.obj \
-  $(COMMDIR)\utilscmn.obj \
-  $(COMMDIR)\validate.obj \
-  $(COMMDIR)\valgen.obj \
-  $(COMMDIR)\valtext.obj \
-  $(COMMDIR)\date.obj \
-  $(COMMDIR)\hash.obj \
-  $(COMMDIR)\list.obj \
-  $(COMMDIR)\string.obj \
-  $(COMMDIR)\socket.obj \
-  $(COMMDIR)\sckaddr.obj \
-  $(COMMDIR)\sckfile.obj \
-  $(COMMDIR)\sckipc.obj \
-  $(COMMDIR)\sckstrm.obj \
-  $(COMMDIR)\url.obj \
-  $(COMMDIR)\http.obj \
-  $(COMMDIR)\protocol.obj \
-  $(COMMDIR)\time.obj \
-  $(COMMDIR)\tokenzr.obj \
-  $(COMMDIR)\wxexpr.obj \
-  $(COMMDIR)\y_tab.obj \
-  $(COMMDIR)\extended.obj \
-  $(COMMDIR)\process.obj \
-  $(COMMDIR)\wfstream.obj \
-  $(COMMDIR)\mstream.obj \
-  $(COMMDIR)\zstream.obj \
-  $(COMMDIR)\stream.obj \
-  $(COMMDIR)\datstrm.obj \
-  $(COMMDIR)\objstrm.obj \
-  $(COMMDIR)\variant.obj \
-  $(COMMDIR)\wincmn.obj
-
-MSWOBJS = \
-  $(MSWDIR)\accel.obj \
-  $(MSWDIR)\app.obj \
-  $(MSWDIR)\bitmap.obj \
-  $(MSWDIR)\bmpbuttn.obj \
-  $(MSWDIR)\brush.obj \
-  $(MSWDIR)\button.obj \
-  $(MSWDIR)\checkbox.obj \
-  $(MSWDIR)\checklst.obj \
-  $(MSWDIR)\choice.obj \
-  $(MSWDIR)\clipbrd.obj \
-  $(MSWDIR)\colordlg.obj \
-  $(MSWDIR)\colour.obj \
-  $(MSWDIR)\combobox.obj \
-  $(MSWDIR)\control.obj \
-  $(MSWDIR)\curico.obj \
-  $(MSWDIR)\cursor.obj \
-  $(MSWDIR)\data.obj \
-  $(MSWDIR)\dc.obj \
-  $(MSWDIR)\dcmemory.obj \
-  $(MSWDIR)\dcclient.obj \
-  $(MSWDIR)\dcprint.obj \
-  $(MSWDIR)\dcscreen.obj \
-  $(MSWDIR)\dde.obj \
-  $(MSWDIR)\dialog.obj \
-  $(MSWDIR)\dib.obj \
-  $(MSWDIR)\dibutils.obj \
-  $(MSWDIR)\dirdlg.obj \
-  $(MSWDIR)\filedlg.obj \
-  $(MSWDIR)\font.obj \
-  $(MSWDIR)\fontdlg.obj \
-  $(MSWDIR)\frame.obj \
-  $(MSWDIR)\gauge95.obj \
-  $(MSWDIR)\gaugemsw.obj \
-  $(MSWDIR)\gdiobj.obj \
-  $(MSWDIR)\helpwin.obj \
-  $(MSWDIR)\icon.obj \
-  $(MSWDIR)\iniconf.obj \
-  $(MSWDIR)\joystick.obj \
-  $(MSWDIR)\imaglist.obj \
-  $(MSWDIR)\listbox.obj \
-  $(MSWDIR)\listctrl.obj \
-  $(MSWDIR)\main.obj \
-  $(MSWDIR)\mdi.obj \
-  $(MSWDIR)\menu.obj \
-  $(MSWDIR)\menuitem.obj \
-  $(MSWDIR)\metafile.obj \
-  $(MSWDIR)\minifram.obj \
-  $(MSWDIR)\msgdlg.obj \
-  $(MSWDIR)\nativdlg.obj \
-  $(MSWDIR)\notebook.obj \
-  $(MSWDIR)\ownerdrw.obj \
-  $(MSWDIR)\palette.obj \
-  $(MSWDIR)\pen.obj \
-  $(MSWDIR)\penwin.obj \
-  $(MSWDIR)\pnghand.obj \
-  $(MSWDIR)\printdlg.obj \
-  $(MSWDIR)\printwin.obj \
-  $(MSWDIR)\radiobox.obj \
-  $(MSWDIR)\radiobut.obj \
-  $(MSWDIR)\region.obj \
-  $(MSWDIR)\registry.obj \
-  $(MSWDIR)\regconf.obj \
-  $(MSWDIR)\scrolbar.obj \
-  $(MSWDIR)\settings.obj \
-  $(MSWDIR)\slidrmsw.obj \
-  $(MSWDIR)\slider95.obj \
-  $(MSWDIR)\spinbutt.obj \
-  $(MSWDIR)\statbmp.obj \
-  $(MSWDIR)\statbox.obj \
-  $(MSWDIR)\statbr95.obj \
-  $(MSWDIR)\stattext.obj \
-  $(MSWDIR)\tabctrl.obj \
-  $(MSWDIR)\taskbar.obj \
-  $(MSWDIR)\tbar95.obj \
-  $(MSWDIR)\tbarmsw.obj \
-  $(MSWDIR)\textctrl.obj \
-  $(MSWDIR)\thread.obj \
-  $(MSWDIR)\timer.obj \
-  $(MSWDIR)\tooltip.obj \
-  $(MSWDIR)\treectrl.obj \
-  $(MSWDIR)\utils.obj \
-  $(MSWDIR)\utilsexc.obj \
-  $(OLEDIR)\uuid.obj \
-  $(MSWDIR)\wave.obj \
-  $(MSWDIR)\window.obj \
-  $(MSWDIR)\xpmhand.obj \
-  $(OLEDIR)\dataobj.obj \
-  $(OLEDIR)\automtn.obj \
-  $(OLEDIR)\droptgt.obj \
-  $(OLEDIR)\dropsrc.obj \
-  $(OLEDIR)\oleutils.obj
-
-# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
-
-# Normal, static library
-all:    $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm $(LIBTARGET)
-
-# wxWindows library as DLL
-dll:
-        nmake -f makefile.vc all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1
-
-# wxWindows + app as DLL. Only affects main.cpp.
-dllapp:
-        nmake -f makefile.vc all FINAL=$(FINAL) DLL=1
-
-# wxWindows + app as DLL, for Netscape plugin - remove DllMain.
-dllnp:
-        nmake -f makefile.vc all NOMAIN=1 FINAL=$(FINAL) DLL=1
-
-# Use this to make dummy.obj and generate a PCH.
-# You might use the dll target, then the pch target, in order to
-# generate a DLL, then a PCH/dummy.obj for compiling your applications with.
-#
-# Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
-# are associated with wx.lib. When using a DLL version of wxWindows, however,
-# the DLL is compiled without a PCH, so you only need it for compiling the app.
-# In fact headers are compiled differently depending on whether a DLL is being made
-# or an app is calling the DLL exported functionality (WXDLLEXPORT is different
-# in each case) so you couldn't use the same PCH.
-pch:
-        nmake -f makefile.vc pch1 WXUSINGDLL=1
-
-pch1:   $(DUMMYOBJ)
-
-$(WXDIR)\lib\wx.lib:      dummy.obj $(OBJECTS) $(PERIPH_LIBS)
-	-erase $(LIBTARGET)
-	$(implib) @<<
--out:$@
--machine:$(CPU)
-$(OBJECTS) $(PERIPH_LIBS)
-<<
-
-# Update the import library
-$(WXDIR)\lib\wx200.lib: $(DUMMYOBJ) $(OBJECTS)
-    $(implib) @<<
-    -machine:$(CPU)
-    -def:wx.def
-    $(DUMMYOBJ) $(OBJECTS)
-    -out:$(WXDIR)\lib\wx200.lib
-<<
-
-# Update the dynamic link library
-$(WXDIR)\lib\wx200.dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx200.lib
-    $(link) @<<
-    $(LINKFLAGS)
-    -out:$(WXDIR)\lib\wx200.dll
-    $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\xpm.lib
-<<
-
-########################################################
-# Windows-specific objects
-
-dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
-        cl $(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF)
-
-dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
-        cl @<<
-$(CPPFLAGS) $(MAKEPRECOMP) /c /Tp $*.$(SRCSUFF)
-<<
-
-# If taking wxWindows from CVS, setup.h doesn't exist yet.
-$(WXDIR)\include\wx\msw\setup.h: $(WXDIR)\include\wx\msw\setup0.h
-    -copy "$(WXDIR)"\include\wx\msw\setup.h "$(WXDIR)"\include\wx\msw\setup.bak
-    copy "$(WXDIR)"\include\wx\msw\setup0.h "$(WXDIR)"\include\wx\msw\setup.h 
-
-$(MSWDIR)/accel.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/app.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /D__NO_VC_CRTDBG__ /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/bitmap.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/bmpbuttn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/brush.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/button.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/choice.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/checkbox.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/checklst.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/clipbrd.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/colordlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/colour.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/combobox.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/control.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/curico.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/cursor.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/data.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dde.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-<<
-
-$(MSWDIR)/dc.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dcmemory.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dcclient.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dcprint.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dcscreen.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dialog.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dib.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dibutils.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/dirdlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/filedlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/font.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/fontdlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/frame.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/gauge95.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/gaugemsw.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/gdiobj.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/icon.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/imaglist.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/joystick.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/listbox.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-<<
-
-$(MSWDIR)/listctrl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-<<
-
-$(MSWDIR)/main.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/mdi.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/menu.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/menuitem.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/metafile.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/minifram.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/msgdlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/nativdlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/notebook.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/ownerdrw.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/palette.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/pen.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/penwin.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/pnghand.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/xpmhand.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/printdlg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/printwin.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/radiobox.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/radiobut.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/region.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/registry.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/regconf.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/scrolbar.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/settings.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/slidrmsw.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/slider95.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/spinbutt.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/statbmp.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/statbox.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/statbr95.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/stattext.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/tabctrl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/taskbar.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/tbar95.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/tbarmsw.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/textctrl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/thread.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/timer.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/tooltip.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/treectrl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/utils.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/utilsexc.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/wave.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(MSWDIR)/window.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/droptgt.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/dropsrc.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/dataobj.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/oleutils.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/uuid.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(OLEDIR)/automtn.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-########################################################
-# Common objects (always compiled)
-
-$(COMMDIR)/cmndata.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/config.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/db.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/dbtable.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/docview.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/docmdi.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/dynarray.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/dynlib.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/event.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/file.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/fileconf.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/filefn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/framecmn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/ftp.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/gdicmn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/image.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/intl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/ipcbase.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/helpbase.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/layout.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/log.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/memory.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/mimetype.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/module.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/object.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/odbc.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/prntbase.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/resource.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/tbarbase.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/tbarsmpl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/textfile.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/timercmn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/utilscmn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(COMMDIR)/validate.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+{..\generic}.cpp{..\generic\$D}.obj:
+	cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $<
 <<
 
-$(COMMDIR)/valgen.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+{..\common}.cpp{..\common\$D}.obj:
+	cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $<
 <<
 
-$(COMMDIR)/valtext.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+{..\msw}.cpp{..\msw\$D}.obj:
+	cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $<
 <<
 
-$(COMMDIR)/date.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+{..\msw\ole}.cpp{..\msw\ole\$D}.obj:
+	cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $<
 <<
 
-$(COMMDIR)/wxexpr.obj:     $*.$(SRCSUFF)
-        echo $(CPPFLAGS)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+GENERICOBJS= \
+  ..\generic\$D\choicdgg.obj \
+  ..\generic\$D\gridg.obj \
+  ..\generic\$D\laywin.obj \
+  ..\generic\$D\panelg.obj \
+  ..\generic\$D\prop.obj \
+  ..\generic\$D\propform.obj \
+  ..\generic\$D\proplist.obj \
+  ..\generic\$D\sashwin.obj \
+  ..\generic\$D\scrolwin.obj \
+  ..\generic\$D\splitter.obj \
+  ..\generic\$D\statusbr.obj \
+  ..\generic\$D\tabg.obj \
+  ..\generic\$D\textdlgg.obj
+
+#  ..\generic\$D\imaglist.obj \
+#  ..\generic\$D\treectrl.obj \
+#  ..\generic\$D\listctrl.obj \
+#  ..\generic\$D\notebook.obj \
 
-$(COMMDIR)/hash.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# These are generic things that don't need to be compiled on MSW,
+# but sometimes it's useful to do so for testing purposes.
+NONESSENTIALOBJS= \
+  ..\generic\$D\printps.obj \
+  ..\generic\$D\prntdlgg.obj \
+  ..\generic\$D\msgdlgg.obj \
+  ..\generic\$D\helpxlp.obj \
+  ..\generic\$D\colrdlgg.obj \
+  ..\generic\$D\fontdlgg.obj
 
-$(COMMDIR)/list.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+COMMONOBJS = \
+  ..\common\$D\cmndata.obj \
+  ..\common\$D\config.obj \
+  ..\common\$D\db.obj \
+  ..\common\$D\dbtable.obj \
+  ..\common\$D\docview.obj \
+  ..\common\$D\docmdi.obj \
+  ..\common\$D\dynarray.obj \
+  ..\common\$D\dynlib.obj \
+  ..\common\$D\event.obj \
+  ..\common\$D\file.obj \
+  ..\common\$D\filefn.obj \
+  ..\common\$D\fileconf.obj \
+  ..\common\$D\framecmn.obj \
+  ..\common\$D\ftp.obj \
+  ..\common\$D\gdicmn.obj \
+  ..\common\$D\image.obj \
+  ..\common\$D\intl.obj \
+  ..\common\$D\ipcbase.obj \
+  ..\common\$D\helpbase.obj \
+  ..\common\$D\layout.obj \
+  ..\common\$D\log.obj \
+  ..\common\$D\memory.obj \
+  ..\common\$D\mimetype.obj \
+  ..\common\$D\module.obj \
+  ..\common\$D\odbc.obj \
+  ..\common\$D\object.obj \
+  ..\common\$D\prntbase.obj \
+  ..\common\$D\resource.obj \
+  ..\common\$D\tbarbase.obj \
+  ..\common\$D\tbarsmpl.obj \
+  ..\common\$D\textfile.obj \
+  ..\common\$D\timercmn.obj \
+  ..\common\$D\utilscmn.obj \
+  ..\common\$D\validate.obj \
+  ..\common\$D\valgen.obj \
+  ..\common\$D\valtext.obj \
+  ..\common\$D\date.obj \
+  ..\common\$D\hash.obj \
+  ..\common\$D\list.obj \
+  ..\common\$D\string.obj \
+  ..\common\$D\socket.obj \
+  ..\common\$D\sckaddr.obj \
+  ..\common\$D\sckfile.obj \
+  ..\common\$D\sckipc.obj \
+  ..\common\$D\sckstrm.obj \
+  ..\common\$D\url.obj \
+  ..\common\$D\http.obj \
+  ..\common\$D\protocol.obj \
+  ..\common\$D\time.obj \
+  ..\common\$D\tokenzr.obj \
+  ..\common\$D\wxexpr.obj \
+  ..\common\$D\y_tab.obj \
+  ..\common\$D\extended.obj \
+  ..\common\$D\process.obj \
+  ..\common\$D\wfstream.obj \
+  ..\common\$D\mstream.obj \
+  ..\common\$D\zstream.obj \
+  ..\common\$D\stream.obj \
+  ..\common\$D\datstrm.obj \
+  ..\common\$D\objstrm.obj \
+  ..\common\$D\variant.obj \
+  ..\common\$D\wincmn.obj
 
-$(COMMDIR)/string.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+MSWOBJS = \
+  ..\msw\$D\accel.obj \
+  ..\msw\$D\app.obj \
+  ..\msw\$D\bitmap.obj \
+  ..\msw\$D\bmpbuttn.obj \
+  ..\msw\$D\brush.obj \
+  ..\msw\$D\button.obj \
+  ..\msw\$D\checkbox.obj \
+  ..\msw\$D\checklst.obj \
+  ..\msw\$D\choice.obj \
+  ..\msw\$D\clipbrd.obj \
+  ..\msw\$D\colordlg.obj \
+  ..\msw\$D\colour.obj \
+  ..\msw\$D\combobox.obj \
+  ..\msw\$D\control.obj \
+  ..\msw\$D\curico.obj \
+  ..\msw\$D\cursor.obj \
+  ..\msw\$D\data.obj \
+  ..\msw\$D\dc.obj \
+  ..\msw\$D\dcmemory.obj \
+  ..\msw\$D\dcclient.obj \
+  ..\msw\$D\dcprint.obj \
+  ..\msw\$D\dcscreen.obj \
+  ..\msw\$D\dde.obj \
+  ..\msw\$D\dialog.obj \
+  ..\msw\$D\dib.obj \
+  ..\msw\$D\dibutils.obj \
+  ..\msw\$D\dirdlg.obj \
+  ..\msw\$D\filedlg.obj \
+  ..\msw\$D\font.obj \
+  ..\msw\$D\fontdlg.obj \
+  ..\msw\$D\frame.obj \
+  ..\msw\$D\gauge95.obj \
+  ..\msw\$D\gaugemsw.obj \
+  ..\msw\$D\gdiobj.obj \
+  ..\msw\$D\helpwin.obj \
+  ..\msw\$D\icon.obj \
+  ..\msw\$D\iniconf.obj \
+  ..\msw\$D\joystick.obj \
+  ..\msw\$D\imaglist.obj \
+  ..\msw\$D\listbox.obj \
+  ..\msw\$D\listctrl.obj \
+  ..\msw\$D\main.obj \
+  ..\msw\$D\mdi.obj \
+  ..\msw\$D\menu.obj \
+  ..\msw\$D\menuitem.obj \
+  ..\msw\$D\metafile.obj \
+  ..\msw\$D\minifram.obj \
+  ..\msw\$D\msgdlg.obj \
+  ..\msw\$D\nativdlg.obj \
+  ..\msw\$D\notebook.obj \
+  ..\msw\$D\ownerdrw.obj \
+  ..\msw\$D\palette.obj \
+  ..\msw\$D\pen.obj \
+  ..\msw\$D\penwin.obj \
+  ..\msw\$D\pnghand.obj \
+  ..\msw\$D\printdlg.obj \
+  ..\msw\$D\printwin.obj \
+  ..\msw\$D\radiobox.obj \
+  ..\msw\$D\radiobut.obj \
+  ..\msw\$D\region.obj \
+  ..\msw\$D\registry.obj \
+  ..\msw\$D\regconf.obj \
+  ..\msw\$D\scrolbar.obj \
+  ..\msw\$D\settings.obj \
+  ..\msw\$D\slidrmsw.obj \
+  ..\msw\$D\slider95.obj \
+  ..\msw\$D\spinbutt.obj \
+  ..\msw\$D\statbmp.obj \
+  ..\msw\$D\statbox.obj \
+  ..\msw\$D\statbr95.obj \
+  ..\msw\$D\stattext.obj \
+  ..\msw\$D\tabctrl.obj \
+  ..\msw\$D\taskbar.obj \
+  ..\msw\$D\tbar95.obj \
+  ..\msw\$D\tbarmsw.obj \
+  ..\msw\$D\textctrl.obj \
+  ..\msw\$D\thread.obj \
+  ..\msw\$D\timer.obj \
+  ..\msw\$D\tooltip.obj \
+  ..\msw\$D\treectrl.obj \
+  ..\msw\$D\utils.obj \
+  ..\msw\$D\utilsexc.obj \
+  ..\msw\ole\$D\uuid.obj \
+  ..\msw\$D\wave.obj \
+  ..\msw\$D\window.obj \
+  ..\msw\$D\xpmhand.obj \
+  ..\msw\ole\$D\dataobj.obj \
+  ..\msw\ole\$D\automtn.obj \
+  ..\msw\ole\$D\droptgt.obj \
+  ..\msw\ole\$D\dropsrc.obj \
+  ..\msw\ole\$D\oleutils.obj
 
-$(COMMDIR)/socket.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
 
-$(COMMDIR)/sckaddr.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# Normal, static library
+all:    dirs $(DUMMYOBJ) $(OBJECTS) $(PERIPH_TARGET) png zlib xpm $(LIBTARGET)
 
-$(COMMDIR)/sckfile.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+dirs: $(MSWDIR)\$D $(COMMDIR)\$D $(GENDIR)\$D $(OLEDIR)\$D 
 
-$(COMMDIR)/sckipc.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+test:   $(MSWDIR)\$D\wave.obj
+test2:  ..\common\Debug\config.obj
 
-$(COMMDIR)/sckstrm.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$D:
+    mkdir $D
 
-$(COMMDIR)/url.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$(COMMDIR)\$D:
+    mkdir $(COMMDIR)\$D
 
-$(COMMDIR)/http.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$(MSWDIR)\$D:
+    mkdir $(MSWDIR)\$D
 
-$(COMMDIR)/protocol.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$(GENDIR)\$D:
+    mkdir $(GENDIR)\$D
 
-$(COMMDIR)/tokenzr.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$(OLEDIR)\$D:
+    mkdir $(OLEDIR)\$D
 
-$(COMMDIR)/matrix.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# wxWindows library as DLL
+dll:
+        nmake -f makefile.vc all FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1
 
-$(COMMDIR)/time.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+cleandll:
+        nmake -f makefile.vc clean FINAL=$(FINAL) DLL=1 WXMAKINGDLL=1
 
-$(COMMDIR)\stream.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# wxWindows + app as DLL. Only affects main.cpp.
+dllapp:
+        nmake -f makefile.vc all FINAL=$(FINAL) DLL=1
 
-$(COMMDIR)\wfstream.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# wxWindows + app as DLL, for Netscape plugin - remove DllMain.
+dllnp:
+        nmake -f makefile.vc all NOMAIN=1 FINAL=$(FINAL) DLL=1
 
-$(COMMDIR)\mstream.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# Use this to make dummy.obj and generate a PCH.
+# You might use the dll target, then the pch target, in order to
+# generate a DLL, then a PCH/dummy.obj for compiling your applications with.
+#
+# Explanation: Normally, when compiling a static version of wx.lib, your dummy.obj/PCH
+# are associated with wx.lib. When using a DLL version of wxWindows, however,
+# the DLL is compiled without a PCH, so you only need it for compiling the app.
+# In fact headers are compiled differently depending on whether a DLL is being made
+# or an app is calling the DLL exported functionality (WXDLLEXPORT is different
+# in each case) so you couldn't use the same PCH.
+pch:    
+        nmake -f makefile.vc pch1 WXUSINGDLL=1 FINAL=$(FINAL)
 
-$(COMMDIR)\zstream.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+pch1:   dirs $(DUMMYOBJ)
+    echo $(DUMMYOBJ)
 
-$(COMMDIR)\datstrm.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+!if "$(WXMAKINGDLL)" != "1"
 
-$(COMMDIR)\objstrm.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+### Static library
 
-$(COMMDIR)/extended.obj:     $*.c
-        cl @<<
-$(CPPFLAGS2) /c $*.c /Fo$@
+$(WXDIR)\lib\$(WXLIBNAME).lib:      $D\dummy.obj $(OBJECTS) $(PERIPH_LIBS)
+	-erase $(LIBTARGET)
+	$(implib) @<<
+-out:$@
+-machine:$(CPU)
+$(OBJECTS) $(PERIPH_LIBS)
 <<
 
-$(COMMDIR)/process.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+!else
 
-$(COMMDIR)/variant.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+### Update the import library
 
-$(COMMDIR)/wincmn.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+$(WXDIR)\lib\$(WXLIBNAME).lib: $(DUMMYOBJ) $(OBJECTS)
+    $(implib) @<<
+    -machine:$(CPU)
+    -def:wx.def
+    $(DUMMYOBJ) $(OBJECTS)
+    -out:$(WXDIR)\lib\$(WXLIBNAME).lib
 <<
 
-$(COMMDIR)/y_tab.obj:     $*.c $(COMMDIR)/lex_yy.c
-        cl @<<
-$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
+# Update the dynamic link library
+$(WXDIR)\lib\$(WXLIBNAME).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\$(WXLIBNAME).lib
+    $(link) @<<
+    $(LINKFLAGS)
+    -out:$(WXDIR)\lib\$(WXLIBNAME).dll
+    $(DUMMYOBJ) $(OBJECTS) $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\xpm.lib
 <<
 
-$(COMMDIR)/y_tab.c:     $(COMMDIR)/dosyacc.c
-        copy "$(COMMDIR)"\dosyacc.c "$(COMMDIR)"\y_tab.c
+!endif
 
-$(COMMDIR)/lex_yy.c:    $(COMMDIR)/doslex.c
-    copy "$(COMMDIR)"\doslex.c "$(COMMDIR)"\lex_yy.c
 
 ########################################################
-# Generic objects (not always compiled, depending on
-# whether platforms have native implementations)
-
-$(GENDIR)/choicdgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/colrdlgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/fontdlgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/gridg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/helpxlp.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/laywin.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/msgdlgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/panelg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/prop.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/propform.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/proplist.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/printps.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/prntdlgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/sashwin.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/scrolwin.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
-
-$(GENDIR)/splitter.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# Windows-specific objects
 
-$(GENDIR)/statusbr.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+$D\dummy.obj: dummy.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
+        cl $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummy.obj /c /Tp dummy.cpp
 
-$(GENDIR)/tabg.obj:     $*.$(SRCSUFF)
+$D\dummydll.obj: dummydll.$(SRCSUFF) $(WXDIR)\include\wx\wx.h $(WXDIR)\include\wx\msw\setup.h
         cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+$(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp
 <<
 
-$(GENDIR)/textdlgg.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+# If taking wxWindows from CVS, setup.h doesn't exist yet.
+$(WXDIR)\include\wx\msw\setup.h: $(WXDIR)\include\wx\msw\setup0.h
+    -copy "$(WXDIR)"\include\wx\msw\setup.h "$(WXDIR)"\include\wx\msw\setup.bak
+    copy "$(WXDIR)"\include\wx\msw\setup0.h "$(WXDIR)"\include\wx\msw\setup.h 
 
-$(GENDIR)/treectrl.obj:     $*.$(SRCSUFF)
+..\common\$D\extended.obj:     ..\common\extended.c
         cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+$(CPPFLAGS2) /c $(COMMDIR)\extended.c /Fo$@
 <<
 
-$(GENDIR)/imaglist.obj:     $*.$(SRCSUFF)
+..\common\$D\y_tab.obj:     ..\common\y_tab.c ..\common\lex_yy.c
         cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+$(CPPFLAGS2) /c ..\common\y_tab.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
 <<
 
-$(GENDIR)/listctrl.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+..\common\y_tab.c:     ..\common\dosyacc.c
+        copy "..\common"\dosyacc.c "..\common"\y_tab.c
 
-$(GENDIR)/notebook.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
-<<
+..\common\lex_yy.c:    ..\common\doslex.c
+    copy "..\common"\doslex.c "..\common"\lex_yy.c
 
 $(OBJECTS):	$(WXDIR)/include/wx/setup.h
 
@@ -1250,9 +416,8 @@ rcparser:
     cd $(WXDIR)\src\msw
 
 clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_xpm
-        -erase *.obj
         -erase $(LIBTARGET)
-        -erase $(WXDIR)\lib\*.pdb
+        -erase $(WXDIR)\lib\$(WXLIBNAME).pdb
         -erase ..\..\lib\wx200.dll
         -erase ..\..\lib\wx200.lib
         -erase ..\..\lib\wx200.exp
@@ -1260,28 +425,25 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_xpm
         -erase ..\..\lib\wx200.ilk
         -erase *.pdb
         -erase *.sbr
-        -erase *.pch
-        cd $(WXDIR)\src\msw
-        cd $(GENDIR)
-        -erase *.pdb
-        -erase *.sbr
-        -erase *.obj
-        cd $(WXDIR)\src\msw
-        cd $(COMMDIR)
-        -erase *.pdb
-        -erase *.sbr
-        -erase *.obj
-        -erase y_tab.c
-        -erase lex_yy.c
-        cd $(WXDIR)\src\msw
-        cd $(OLEDIR)
-        -erase *.pdb
-        -erase *.sbr
-        -erase *.obj
-        cd $(WXDIR)\src\msw
-#        -erase ..\common\wxstrgnu\*.obj
-#        -erase ..\common\lex_yy.c
-#        -erase ..\common\y_tab.c
+        -erase $(WXLIBNAME).pch
+        -erase $(GENDIR)\$D\*.obj
+        -erase $(GENDIR)\$D\*.pdb
+        -erase $(GENDIR)\$D\*.sbr
+        -erase $(COMMDIR)\$D\*.obj
+        -erase $(COMMDIR)\$D\*.pdb
+        -erase $(COMMDIR)\$D\*.sbr
+        -erase $(COMMDIR)\\y_tab.c
+        -erase $(COMMDIR)\lex_yy.c
+        -erase $(MSWDIR)\$D\*.obj
+        -erase $(MSWDIR)\$D\*.sbr
+        -erase $(MSWDIR)\$D\*.pdb
+        -erase $(OLEDIR)\$D\*.obj
+        -erase $(OLEDIR)\$D\*.sbr
+        -erase $(OLEDIR)\$D\*.pdb
+        -rmdir $(D)
+        -rmdir ole\$(D)
+        -rmdir ..\generic\$(D)
+        -rmdir ..\common\$(D)
 
 cleanall: clean
 
@@ -1323,10 +485,6 @@ allhlp: wxhlp portinghlp prop # faqhlp
 
 #        cd $(WXDIR)\utils\wxhelp\src
 #        nmake -f makefile.vc hlp
-#        cd $(WXDIR)\utils\wxhelp2\src
-#        nmake -f makefile.vc hlp
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.vc hlp
 #        cd $(WXDIR)\utils\tex2rtf\src
 #        nmake -f makefile.vc hlp
 #        cd $(WXDIR)\utils\wxgraph\src
@@ -1339,13 +497,6 @@ allhlp: wxhlp portinghlp prop # faqhlp
 #        nmake -f makefile.vc hlp
 #        cd $(WXDIR)\utils\wxgrid\src
 #        nmake -f makefile.vc hlp
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.vc hlp
-
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.vc hlp
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.vc hlp
 
 allhtml: wxhtml portinghtml prophtml # faqhtml
         cd $(WXDIR)\utils\dialoged\src
@@ -1359,10 +510,6 @@ allhtml: wxhtml portinghtml prophtml # faqhtml
 #        nmake -f makefile.vc html
 #        cd $(WXDIR)\utils\wxhelp\src
 #        nmake -f makefile.vc html
-#        cd $(WXDIR)\utils\wxhelp2\src
-#        nmake -f makefile.vc html
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.vc html
 #        cd $(WXDIR)\utils\tex2rtf\src
 #        nmake -f makefile.vc html
 #        cd $(WXDIR)\utils\wxgraph\src
@@ -1371,13 +518,6 @@ allhtml: wxhtml portinghtml prophtml # faqhtml
 #        nmake -f makefile.vc html
 #        cd $(WXDIR)\utils\wxtree\src
 #        nmake -f makefile.vc html
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.vc html
-
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.vc html
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.vc html
 
 allps: wxps referencps portingps propps # faqps
         cd $(WXDIR)\utils\dialoged\src
@@ -1391,8 +531,6 @@ allpdfrtf: pdfrtf portingpdfrtf proppdfrtf # faqpdfrtf
 
 #        cd $(WXDIR)\utils\wxhelp\src
 #        nmake -f makefile.vc ps
-#        cd $(WXDIR)\utils\wxhelp2\src
-#        nmake -f makefile.vc ps
 #        cd $(WXDIR)\utils\tex2rtf\src
 #        nmake -f makefile.vc ps
 #        cd $(WXDIR)\utils\wxgraph\src
@@ -1403,15 +541,6 @@ allpdfrtf: pdfrtf portingpdfrtf proppdfrtf # faqpdfrtf
 #        nmake -f makefile.vc ps
 #        cd $(THISDIR)
 
-#        cd $(WXDIR)\utils\wxtab\src
-#        nmake -f makefile.vc ps
-#        cd $(WXDIR)\utils\prologio\src
-#        nmake -f makefile.vc ps
-#        cd $(WXDIR)\utils\wxclips\src
-#        nmake -f makefile.vc ps
-#        cd $(WXDIR)\utils\clips2c\src
-#        nmake -f makefile.vc ps
-
 $(DOCDIR)/winhelp/wx.hlp:         $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj
         cd $(DOCDIR)/latex/wx
         -erase wx.ph
diff --git a/src/png/makefile.vc b/src/png/makefile.vc
index b467d41b63..6351a94e85 100644
--- a/src/png/makefile.vc
+++ b/src/png/makefile.vc
@@ -11,8 +11,6 @@
 
 # Change WXDIR or WXWIN to wherever wxWindows is found
 WXDIR = $(WXWIN)
-WXLIB = $(WXDIR)\lib\wx.lib
-WXINC = $(WXDIR)\include
 
 WINPNGDIR = ..\png
 WINPNGINC = $(WINPNGDIR)
diff --git a/src/xpm/makefile.vc b/src/xpm/makefile.vc
index 4dad3c0d52..25f8ab69e4 100644
--- a/src/xpm/makefile.vc
+++ b/src/xpm/makefile.vc
@@ -15,16 +15,6 @@ THISDIR=$(WXWIN)\src\xpm
 
 LIBTARGET=$(WXDIR)\lib\xpm.lib
 
-# Please set these according to the settings in wx_setup.h, so we can include
-# the appropriate libraries in wx.lib
-
-# This one overrides the others, to be consistent with the settings in wx_setup.h
-MINIMAL_WXWINDOWS_SETUP=0
-
-PERIPH_LIBS=
-PERIPH_TARGET=
-PERIPH_CLEAN_TARGET=
-
 XPMDIR=$(WXDIR)\src\xpm
 
 OBJECTS = 	$(XPMDIR)\crbuffri.obj\
diff --git a/utils/nplugin/samples/gui/makefile.vc b/utils/nplugin/samples/gui/makefile.vc
index ff01513d0e..6b7a480b83 100644
--- a/utils/nplugin/samples/gui/makefile.vc
+++ b/utils/nplugin/samples/gui/makefile.vc
@@ -38,11 +38,11 @@ wx:
 
 # Update the dynamic link library
 
-$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
+$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXLIB) $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
     $(link) $(LINKFLAGS) \
     -out:$(PROGRAM).dll   \
     -def:$(PROGRAM).def \
-    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
+    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXLIB) $(PLUGINLIB) \
     $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib
 
 gui.obj:      gui.$(SRCSUFF) gui.h $(DUMMYOBJ)
diff --git a/utils/nplugin/samples/simple/makefile.vc b/utils/nplugin/samples/simple/makefile.vc
index 6587d4e853..d16e182330 100644
--- a/utils/nplugin/samples/simple/makefile.vc
+++ b/utils/nplugin/samples/simple/makefile.vc
@@ -38,11 +38,11 @@ wx:
 
 # Update the dynamic link library
 
-$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXDIR)\lib\wx.lib $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
+$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXLIB) $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
     $(link) $(LINKFLAGS) \
     -out:$(PROGRAM).dll   \
     -def:$(PROGRAM).def \
-    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXDIR)\lib\wx.lib $(PLUGINLIB) \
+    $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXLIB) $(PLUGINLIB) \
     $(guilibsdll) lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib
 
 simple.obj:      simple.$(SRCSUFF) $(DUMMYOBJ)
-- 
2.50.0

