From 8a2c6ef8d186df490df28a694820a5e8afc4b5e8 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Thu, 7 Jan 1999 15:22:05 +0000
Subject: [PATCH] Watcom C++ mods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 distrib/msw/generic.rsp        |   2 +
 distrib/msw/msw.rsp            |   1 +
 docs/latex/wx/app.tex          |   2 +-
 docs/latex/wx/body.tex         |  55 ++++++++-------
 docs/latex/wx/function.tex     |   8 ++-
 docs/latex/wx/strlist.tex      |   4 +-
 docs/latex/wx/wxstring.tex     |  13 ++--
 docs/msw/install.txt           |   5 +-
 docs/msw/todo.txt              |   2 +
 docs/todo.txt                  |  14 +++-
 include/wx/msw/treectrl.h      |   4 ++
 include/wx/protocol/ftp.h      |   2 +-
 include/wx/protocol/http.h     |   2 +-
 include/wx/protocol/protocol.h |   4 +-
 samples/bombs/makefile.wat     |   4 +-
 samples/checklst/makefile.wat  |  15 ++++
 samples/config/makefile.wat    |  15 ++++
 samples/controls/makefile.wat  |  15 ++++
 samples/db/makefile.wat        |  15 ++++
 samples/dialogs/makefile.wat   |  15 ++++
 samples/dnd/makefile.wat       |  15 ++++
 samples/docview/makefile.wat   |  40 ++---------
 samples/docvwmdi/makefile.wat  |  15 ++++
 samples/forty/makefile.wat     |  15 ++++
 samples/fractal/makefile.wat   |   4 +-
 samples/grid/makefile.wat      |  15 ++++
 samples/help/makefile.wat      |  15 ++++
 samples/image/makefile.wat     |  15 ++++
 samples/internat/makefile.wat  |  40 ++---------
 samples/joytest/makefile.wat   |  40 ++---------
 samples/layout/makefile.wat    |  41 ++---------
 samples/listctrl/makefile.wat  |  15 ++++
 samples/mdi/makefile.wat       |  40 ++---------
 samples/memcheck/makefile.wat  |  40 ++---------
 samples/mfc/makefile.wat       |   4 +-
 samples/minifram/makefile.wat  |  15 ++++
 samples/nativdlg/makefile.wat  |  39 ++---------
 samples/notebook/makefile.wat  |  15 ++++
 samples/oleauto/makefile.wat   |  15 ++++
 samples/ownerdrw/makefile.wat  |  15 ++++
 samples/png/makefile.wat       |  15 ++++
 samples/printing/makefile.wat  |  15 ++++
 samples/proplist/makefile.wat  |  15 ++++
 samples/regtest/makefile.wat   |  15 ++++
 samples/resource/makefile.wat  |  39 ++---------
 samples/sashtest/makefile.wat  |  15 ++++
 samples/splitter/makefile.wat  |  15 ++++
 samples/tab/makefile.wat       |  15 ++++
 samples/taskbar/makefile.wat   |  15 ++++
 samples/thread/makefile.wat    |  15 ++++
 samples/toolbar/makefile.wat   |  15 ++++
 samples/treectrl/makefile.wat  |  15 ++++
 samples/typetest/makefile.wat  |  15 ++++
 samples/validate/makefile.wat  |  15 ++++
 samples/wxpoem/makefile.wat    |  15 ++++
 samples/wxsocket/client.wat    |  15 ++++
 samples/wxsocket/server.wat    |  15 ++++
 src/common/ftp.cpp             |   2 +-
 src/common/http.cpp            |   2 +-
 src/common/list.cpp            |   2 +
 src/common/url.cpp             |   7 +-
 src/makeprog.wat               |  13 +++-
 src/makewat.env                |   6 +-
 src/msw/app.cpp                |   4 +-
 src/msw/makefile.wat           | 121 +++++++++++++++++++++++++--------
 src/png/makefile.wat           |  40 +++++++++++
 src/xpm/makefile.wat           |  54 +++++++++++++++
 src/zlib/makefile.wat          |   4 +-
 68 files changed, 821 insertions(+), 363 deletions(-)
 create mode 100644 samples/checklst/makefile.wat
 create mode 100644 samples/config/makefile.wat
 create mode 100644 samples/controls/makefile.wat
 create mode 100644 samples/db/makefile.wat
 create mode 100644 samples/dialogs/makefile.wat
 create mode 100644 samples/dnd/makefile.wat
 create mode 100644 samples/docvwmdi/makefile.wat
 create mode 100644 samples/forty/makefile.wat
 create mode 100644 samples/grid/makefile.wat
 create mode 100644 samples/help/makefile.wat
 create mode 100644 samples/image/makefile.wat
 create mode 100644 samples/listctrl/makefile.wat
 create mode 100644 samples/minifram/makefile.wat
 create mode 100644 samples/notebook/makefile.wat
 create mode 100644 samples/oleauto/makefile.wat
 create mode 100644 samples/ownerdrw/makefile.wat
 create mode 100644 samples/png/makefile.wat
 create mode 100644 samples/printing/makefile.wat
 create mode 100644 samples/proplist/makefile.wat
 create mode 100644 samples/regtest/makefile.wat
 create mode 100644 samples/sashtest/makefile.wat
 create mode 100644 samples/splitter/makefile.wat
 create mode 100644 samples/tab/makefile.wat
 create mode 100644 samples/taskbar/makefile.wat
 create mode 100644 samples/thread/makefile.wat
 create mode 100644 samples/toolbar/makefile.wat
 create mode 100644 samples/treectrl/makefile.wat
 create mode 100644 samples/typetest/makefile.wat
 create mode 100644 samples/validate/makefile.wat
 create mode 100644 samples/wxpoem/makefile.wat
 create mode 100644 samples/wxsocket/client.wat
 create mode 100644 samples/wxsocket/server.wat
 create mode 100644 src/png/makefile.wat
 create mode 100644 src/xpm/makefile.wat

diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp
index 4be8358cfd..8febedb3af 100644
--- a/distrib/msw/generic.rsp
+++ b/distrib/msw/generic.rsp
@@ -266,6 +266,8 @@ samples/wxsocket/*.cpp
 samples/wxsocket/*.h
 samples/wxsocket/*.def
 samples/wxsocket/makefile*
+samples/wxsocket/client.wat
+samples/wxsocket/server.wat
 samples/wxsocket/*.xbm
 samples/wxsocket/*.xpm
 samples/wxsocket/*.ico
diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp
index 8227e1cfea..db1209cb7b 100644
--- a/distrib/msw/msw.rsp
+++ b/distrib/msw/msw.rsp
@@ -43,6 +43,7 @@ src/msw/*.prj
 
 src/xpm/*.c
 src/xpm/*.h
+src/xpm/makefile*
 src/xpm/changes
 src/xpm/readme
 src/xpm/readme.msw
diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex
index 9ffe9c7190..bd02e31db8 100644
--- a/docs/latex/wx/app.tex
+++ b/docs/latex/wx/app.tex
@@ -229,7 +229,7 @@ application have all been processed, wxWindows sends an OnIdle event to the appl
 sends an OnIdle event to each application window, allowing windows to do idle processing such as updating
 their appearance. If either wxApp::OnIdle or a window OnIdle function requested more time, by
 caling \helpref{wxIdleEvent::ReqestMore}{wxidleeventrequestmore}, wxWindows will send another OnIdle
-event to the application event. This will occur in a loop until either a user event is found to be
+event to the application object. This will occur in a loop until either a user event is found to be
 pending, or OnIdle requests no more time. Then all pending user events are processed until the system
 goes idle again, when OnIdle is called, and so on.
 
diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex
index 238551d945..8b8c35c2de 100644
--- a/docs/latex/wx/body.tex
+++ b/docs/latex/wx/body.tex
@@ -7,7 +7,7 @@
 
 wxWindows is a C++ framework providing GUI (Graphical User
 Interface) and other facilities on more than one platform.  Version 2.0 currently
-supports subsets MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif
+supports MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif
 and Mac ports in an advanced state.
 
 wxWindows was originally developed at the Artificial Intelligence
@@ -29,7 +29,7 @@ variants, unless otherwise stated. All trademarks are acknowledged.
 
 wxWindows was developed to provide a cheap and flexible way to maximize
 investment in GUI application development.  While a number of commercial
-class libraries already exist for cross-platform development,
+class libraries already existed for cross-platform development,
 none met all of the following criteria:
 
 \begin{enumerate}\itemsep=0pt
@@ -39,22 +39,24 @@ none met all of the following criteria:
 \item support for a wide range of compilers.
 \end{enumerate}
 
+Since wxWindows was started, several other free or almost-free GUI frameworks have
+emerged. However, none has the range of features, flexibility, documentation and the
+well-established development team that wxWindows has.
+
 As public domain software and a project open to everyone, wxWindows has
 benefited from comments, ideas, bug fixes, enhancements and the sheer
 enthusiasm of users, especially via the Internet. This gives wxWindows a
-certain advantage over its commercial brothers, and a robustness against
+certain advantage over its commercial competitors (and over free libraries
+without an independent development team), plus a robustness against
 the transience of one individual or company. This openness and
 availability of source code is especially important when the future of
 thousands of lines of application code may depend upon the longevity of
 the underlying class library.
 
-In writing wxWindows, completeness has sometimes been traded for
-portability and simplicity of programming. Version 2.0 goes much
-further than previous versions in terms of generality and features,
+Version 2.0 goes much further than previous versions in terms of generality and features,
 allowing applications to be produced
 that are often indistinguishable from those produced using single-platform
-toolkits
-such as Motif and MFC.
+toolkits such as Motif and MFC.
 
 The importance of using a platform-independent class library cannot be
 overstated, since GUI application development is very time-consuming,
@@ -62,10 +64,9 @@ and sustained popularity of particular GUIs cannot be guaranteed.
 Code can very quickly become obsolete if it addresses the wrong
 platform or audience.  wxWindows helps to insulate the programmer from
 these winds of change. Although wxWindows may not be suitable for
-every application, it provides access to most of the functionality a
-GUI program normally requires, plus some extras such as form
-construction, interprocess communication and PostScript output, and
-can of course be extended as needs dictate.  As a bonus, it provides
+every application (such as an OLE-intensive program), it provides access to most of the functionality a
+GUI program normally requires, plus some extras such as network programming
+and PostScript output, and can of course be extended as needs dictate.  As a bonus, it provides
 a cleaner programming interface than the native
 APIs. Programmers may find it worthwhile to use wxWindows even if they
 are developing on only one platform.
@@ -76,14 +77,19 @@ here are some of the benefits:
 \begin{itemize}\itemsep=0pt
 \item Low cost (free, in fact!)
 \item You get the source.
+\item Available on a variety of popular platforms.
+\item Works with almost all popular C++ compilers.
 \item Several example programs.
 \item Over 700 pages of printable and on-line documentation.
+\item Includes Tex2RTF, to allow you to produce your own documentation
+in Windows Help, HTML and Word RTF formats.
 \item Simple-to-use, object-oriented API.
-\item Graphics calls include splines, polylines, rounded rectangles, etc.
+\item Flexible event system.
+\item Graphics calls include lines, rounded rectangles, splines, polylines, etc.
 \item Constraint-based layout option.
 \item Print/preview and document/view architectures.
-\item Status line facility, toolbar
-\item Encapsulated PostScript generation under Unix, normal MS Windows printing on the
+\item Toolbar, notebook, tree control, advanced list control classes.
+\item PostScript generation under Unix, normal MS Windows printing on the
 PC.
 \item MDI (Multiple Document Interface) support.
 \item Can be used to create DLLs under Windows, dynamic libraries on Unix.
@@ -92,7 +98,7 @@ PC.
 them to the clipboard.
 \item An API for invoking help from applications.
 \item Dialog Editor for building dialogs.
-\item Socket support.
+\item Network support via a family of socket and protocol classes.
 \end{itemize}
 
 \section{Changes from version 1.xx}\label{versionchanges}
@@ -167,7 +173,9 @@ following setups.
 
 \begin{enumerate}\itemsep=0pt
 \item A 486 or higher PC running MS Windows.
-\item One of Microsoft Visual C++ 4.0 or higher, Borland C++, Gnu-Win32.
+\item A Windows compiler: most are supported, but please see {\tt install.txt} for
+details. Supported compilers include Microsoft Visual C++ 4.0 or higher, Borland C++, Cygwin,
+Metrowerks CodeWarrior.
 \item At least 60 MB of disk space.
 \end{enumerate}
 
@@ -399,7 +407,7 @@ wxWindows does not use templates since it is a notoriously unportable feature.
 
 Some compilers, such as Borland C++ and Microsoft C++, support
 precompiled headers. This can save a great deal of compiling time. The
-recommended approach is to precompile {\tt ``wx.h''}, using this
+recommended approach is to precompile {\tt "wx.h"}, using this
 precompiled header for compiling both wxWindows itself and any
 wxWindows applications. For Windows compilers, two dummy source files
 are provided (one for normal applications and one for creating DLLs)
@@ -409,8 +417,7 @@ However, there are several downsides to using precompiled headers. One
 is that to take advantage of the facility, you often need to include
 more header files than would normally be the case. This means that
 changing a header file will cause more recompilations (in the case of
-wxWindows, everything needs to be recompiled since everything includes
-{\tt ``wx.h''}!)
+wxWindows, everything needs to be recompiled since everything includes {\tt "wx.h"}!)
 
 A related problem is that for compilers that don't have precompiled
 headers, including a lot of header files slows down compilation
@@ -460,8 +467,9 @@ descriptions of miscellaneous file handling functions.
 A number of `extras' are supplied with wxWindows, to complement
 the GUI functionality in the main class library. These are found
 below the utils directory and usually have their own source, library
-and documentation directories. For larger user-contributed packages,
-see the directory /pub/packages/wxwin/contrib.
+and documentation directories. For other user-contributed packages,
+see the directory ftp://www.remstar.com/pub/wxwin/contrib, which is
+more easily accessed via the Contributions page on the Web site.
 
 \section{wxHelp}\label{wxhelp}
 
@@ -596,8 +604,7 @@ The same goes for other data types: use classes wherever possible.
 
 Don't use absolute panel item positioning if you can avoid it. Different GUIs have
 very differently sized panel items. Consider using the constraint system, although this
-can be complex to program. If you needs are simple, the default relative positioning
-behaviour may be adequate (using default position values and wxPanel::NewLine).
+can be complex to program.
 
 Alternatively, you could use alternative .wrc (wxWindows resource files) on different
 platforms, with slightly different dimensions in each. Or space your panel items out
diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index 2134147532..4ccd704ae8 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -1090,10 +1090,14 @@ Under X, sleeps for the specified number of seconds.
 
 \membersection{::wxStripMenuCodes}
 
-\func{void}{wxStripMenuCodes}{\param{const wxString\& }{in}, \param{const wxString\& }{out}}
+\func{wxString}{wxStripMenuCodes}{\param{const wxString\& }{in}}
+
+\func{void}{wxStripMenuCodes}{\param{char* }{in}, \param{char* }{out}}
 
 Strips any menu codes from {\it in} and places the result
-in {\it out}. Menu codes include \& (mark the next character with an underline
+in {\it out} (or returns the new string, in the first form).
+
+Menu codes include \& (mark the next character with an underline
 as a keyboard shortkey in Windows and Motif) and $\backslash$t (tab in Windows).
 
 \membersection{::wxStartTimer}\label{wxstarttimer}
diff --git a/docs/latex/wx/strlist.tex b/docs/latex/wx/strlist.tex
index 6488e8a3c8..db26f1702f 100644
--- a/docs/latex/wx/strlist.tex
+++ b/docs/latex/wx/strlist.tex
@@ -1,7 +1,7 @@
 \section{\class{wxStringList}}\label{wxstringlist}
 
-A string list is a list which is assumed to contain strings, with a
-specific member functions. Memory is allocated when strings are added to
+A string list is a list which is assumed to contain strings.
+Memory is allocated when strings are added to
 the list, and deallocated by the destructor or by the {\bf Delete}\rtfsp
 member.
 
diff --git a/docs/latex/wx/wxstring.tex b/docs/latex/wx/wxstring.tex
index 5d1d728a2e..077bdf7e01 100644
--- a/docs/latex/wx/wxstring.tex
+++ b/docs/latex/wx/wxstring.tex
@@ -187,12 +187,13 @@ If {\bf caseSensitive}, comparison is case sensitive (the default).
 
 Returns the index of the first item matched, or NOT\_FOUND.
 
-\membersection{wxString::Insert}\label{wxstringInsert}
-
-\func{void}{Insert}{\param{const wxString\&}{ str}, \param{uint}{ index}}
-
-Add new element at the given position.
- 
+% TODO
+%\membersection{wxString::insert}\label{wxstringinsert}
+% Wrong!
+%\func{void}{insert}{\param{const wxString\&}{ str}, \param{uint}{ index}}
+%
+%Add new element at the given position.
+%
 \membersection{wxString::IsAscii}\label{wxstringIsAscii}
 
 \constfunc{bool}{IsAscii}{\void}
diff --git a/docs/msw/install.txt b/docs/msw/install.txt
index f840b14f72..0cfdf3e556 100644
--- a/docs/msw/install.txt
+++ b/docs/msw/install.txt
@@ -97,15 +97,12 @@ project files are currently supplied.
 Watcom C++ 10.6 compilation
 ---------------------------
 
-Currently under construction, but so far we have:
-
 1. Make sure your WXWIN variable is set, and uses the FAT (short
    name) form.
 2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
    make the wxWindows core library.
 3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
-   to make this sample. There are a lot of link errors at this
-   point, so can anyone help work out what I've done wrong?
+   to make this sample.
 
 Metrowerks CodeWarrior compilation
 ----------------------------------
diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt
index bb425cd9a4..85f37b2ec2 100644
--- a/docs/msw/todo.txt
+++ b/docs/msw/todo.txt
@@ -33,6 +33,8 @@ Add centring, right justify styles to wxStaticText.
 Extend wxSystemSettings to get symbols for current nationality,
 e.g. ',' instead of '.' for decimal points.
 
+Supply correct ctl3d/odbc lib files for BC++, Watcom (corrupt?)
+
 LOW PRIORITY (MEDIUM TERM)
 --------------------------
 
diff --git a/docs/todo.txt b/docs/todo.txt
index fce7963424..4d1f0aef26 100644
--- a/docs/todo.txt
+++ b/docs/todo.txt
@@ -1,11 +1,21 @@
 General ToDo
 ------------
 
-- Write this ToDo list :-)
-
 Please see also:
 
   docs/gtk/todo.txt
   docs/motif/todo.txt
   docs/msw/todo.txt
 
+- Suggestion from Janos Vegh: the memory-checking classes could
+  also keep return the size of memory currently allocated, with
+  a call to return it e.g. int wxDebugContext::GetMemoryUsed().
+  Maybe even an optional window in debug mode with a tally of memory
+  usage, how many classes of each kind are in use, etc.? That
+  would be neat.
+
+- Documentation: mention include files with each class.
+
+- Complete this ToDo list :-)
+
+
diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h
index 4bae542743..9fda6b0f87 100644
--- a/include/wx/msw/treectrl.h
+++ b/include/wx/msw/treectrl.h
@@ -150,7 +150,11 @@ public:
 
     // accessors: set/get the item associated with this node
     void SetId(const wxTreeItemId& id) { m_itemId = id; }
+#ifdef __WATCOMC__
+    const wxTreeItemId GetId() const { return m_itemId; }
+#else
     const wxTreeItemId& GetId() const { return (wxTreeItemId&) m_itemId; }
+#endif
 };
 
 // ----------------------------------------------------------------------------
diff --git a/include/wx/protocol/ftp.h b/include/wx/protocol/ftp.h
index 7fca01f8b7..9f71992f2b 100644
--- a/include/wx/protocol/ftp.h
+++ b/include/wx/protocol/ftp.h
@@ -30,7 +30,7 @@ public:
   ~wxFTP();
 
   bool Close();
-  bool Connect(wxSockAddress& addr);
+  bool Connect(wxSockAddress& addr, bool wait = TRUE);
   bool Connect(const wxString& host);
 
   void SetUser(const wxString& user) { m_user = user; }
diff --git a/include/wx/protocol/http.h b/include/wx/protocol/http.h
index 97282b5665..82c1365889 100644
--- a/include/wx/protocol/http.h
+++ b/include/wx/protocol/http.h
@@ -27,7 +27,7 @@ public:
   ~wxHTTP();
 
   bool Connect(const wxString& host);
-  bool Connect(wxSockAddress& addr);
+  bool Connect(wxSockAddress& addr, bool wait);
   bool Abort();
   wxInputStream *GetInputStream(const wxString& path);
   inline wxProtocolError GetError() { return m_perr; }
diff --git a/include/wx/protocol/protocol.h b/include/wx/protocol/protocol.h
index d0126a922b..b672953690 100644
--- a/include/wx/protocol/protocol.h
+++ b/include/wx/protocol/protocol.h
@@ -63,8 +63,8 @@ public:
   wxProtocol();
 
   bool Reconnect();
-  virtual bool Connect( const wxString& WXUNUSED(host) ) { return FALSE; } 
-  virtual bool Connect( wxSockAddress& addr) { return wxSocketClient::Connect(addr); }
+  virtual bool Connect( const wxString& WXUNUSED(host) ) { return FALSE; }
+  virtual bool Connect( wxSockAddress& addr, bool WXUNUSED(wait) = TRUE) { return wxSocketClient::Connect(addr); }
 
   virtual bool Abort() = 0;
   virtual wxInputStream *GetInputStream(const wxString& path) = 0;
diff --git a/samples/bombs/makefile.wat b/samples/bombs/makefile.wat
index ec739e33ab..08562fa92a 100644
--- a/samples/bombs/makefile.wat
+++ b/samples/bombs/makefile.wat
@@ -1,8 +1,8 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
 WXDIR = $(%WXWIN)
diff --git a/samples/checklst/makefile.wat b/samples/checklst/makefile.wat
new file mode 100644
index 0000000000..1e219417b0
--- /dev/null
+++ b/samples/checklst/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = checklst
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/config/makefile.wat b/samples/config/makefile.wat
new file mode 100644
index 0000000000..5d7f4c3530
--- /dev/null
+++ b/samples/config/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = conftest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/controls/makefile.wat b/samples/controls/makefile.wat
new file mode 100644
index 0000000000..db1d6cc5b6
--- /dev/null
+++ b/samples/controls/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = controls
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/db/makefile.wat b/samples/db/makefile.wat
new file mode 100644
index 0000000000..c3d0e8772d
--- /dev/null
+++ b/samples/db/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = dbtest
+OBJECTS = $(PROGRAM).obj listdb.obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/dialogs/makefile.wat b/samples/dialogs/makefile.wat
new file mode 100644
index 0000000000..f0d3b21081
--- /dev/null
+++ b/samples/dialogs/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = dialogs
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/dnd/makefile.wat b/samples/dnd/makefile.wat
new file mode 100644
index 0000000000..1379a8bb3c
--- /dev/null
+++ b/samples/dnd/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = dnd
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/docview/makefile.wat b/samples/docview/makefile.wat
index bafa16f3a5..c701e12cc8 100644
--- a/samples/docview/makefile.wat
+++ b/samples/docview/makefile.wat
@@ -1,43 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = docview
+OBJECTS = $(PROGRAM).obj view.obj doc.obj
 
-WXLIB = $(WXDIR)\lib
-NAME = docview
-LNK = $(name).lnk
-OBJS = $(name).obj doc.obj view.obj
+!include $(WXDIR)\src\makeprog.wat
 
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/docvwmdi/makefile.wat b/samples/docvwmdi/makefile.wat
new file mode 100644
index 0000000000..c701e12cc8
--- /dev/null
+++ b/samples/docvwmdi/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = docview
+OBJECTS = $(PROGRAM).obj view.obj doc.obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/forty/makefile.wat b/samples/forty/makefile.wat
new file mode 100644
index 0000000000..9db1dcaceb
--- /dev/null
+++ b/samples/forty/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = forty
+OBJECTS = $(PROGRAM).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/fractal/makefile.wat b/samples/fractal/makefile.wat
index 1d05fd31c5..d48fab6488 100644
--- a/samples/fractal/makefile.wat
+++ b/samples/fractal/makefile.wat
@@ -1,8 +1,8 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
 WXDIR = $(%WXWIN)
diff --git a/samples/grid/makefile.wat b/samples/grid/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/grid/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/help/makefile.wat b/samples/help/makefile.wat
new file mode 100644
index 0000000000..370b2fcc20
--- /dev/null
+++ b/samples/help/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = demo
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/image/makefile.wat b/samples/image/makefile.wat
new file mode 100644
index 0000000000..3b6cb33829
--- /dev/null
+++ b/samples/image/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = image
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/internat/makefile.wat b/samples/internat/makefile.wat
index 21219d7a0e..31181ee663 100644
--- a/samples/internat/makefile.wat
+++ b/samples/internat/makefile.wat
@@ -1,43 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = internat
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = minimal
-LNK = $(name).lnk
-OBJS = $(name).obj 
+!include $(WXDIR)\src\makeprog.wat
 
-all: $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe
 
diff --git a/samples/joytest/makefile.wat b/samples/joytest/makefile.wat
index d009dcb6a8..57467717d1 100644
--- a/samples/joytest/makefile.wat
+++ b/samples/joytest/makefile.wat
@@ -1,43 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = joytest
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = joytest
-LNK = $(name).lnk
-OBJS = $(name).obj
+!include $(WXDIR)\src\makeprog.wat
 
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/layout/makefile.wat b/samples/layout/makefile.wat
index 5c55c4d9c0..a4b3f2e8f9 100644
--- a/samples/layout/makefile.wat
+++ b/samples/layout/makefile.wat
@@ -1,44 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = layout
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = layout
-LNK = $(name).lnk
-OBJS = $(name).obj
-
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
+!include $(WXDIR)\src\makeprog.wat
 
 
diff --git a/samples/listctrl/makefile.wat b/samples/listctrl/makefile.wat
new file mode 100644
index 0000000000..8edb3a5682
--- /dev/null
+++ b/samples/listctrl/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = listtest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/mdi/makefile.wat b/samples/mdi/makefile.wat
index f959acdb52..8df592246e 100644
--- a/samples/mdi/makefile.wat
+++ b/samples/mdi/makefile.wat
@@ -1,43 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = mdi
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = mdi
-LNK = $(name).lnk
-OBJS = $(name).obj
+!include $(WXDIR)\src\makeprog.wat
 
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/memcheck/makefile.wat b/samples/memcheck/makefile.wat
index f8048794b5..abc4235cea 100644
--- a/samples/memcheck/makefile.wat
+++ b/samples/memcheck/makefile.wat
@@ -1,43 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = memcheck
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = memcheck
-LNK = $(name).lnk
-OBJS = $(name).obj
+!include $(WXDIR)\src\makeprog.wat
 
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\wx\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-thing: .SYMBOLIC
-    echo $(WATLIBDIR)
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/mfc/makefile.wat b/samples/mfc/makefile.wat
index 0958ed9530..965f13eb9a 100644
--- a/samples/mfc/makefile.wat
+++ b/samples/mfc/makefile.wat
@@ -1,8 +1,8 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
 WXDIR = ..\.. 
diff --git a/samples/minifram/makefile.wat b/samples/minifram/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/minifram/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/nativdlg/makefile.wat b/samples/nativdlg/makefile.wat
index 0ad7f98a89..4cbb79e714 100644
--- a/samples/nativdlg/makefile.wat
+++ b/samples/nativdlg/makefile.wat
@@ -1,42 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = nativdlg
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = hello
-LNK = $(name).lnk
-OBJS = $(name).obj 
+!include $(WXDIR)\src\makeprog.wat
 
-PRECOMP=
-
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/notebook/makefile.wat b/samples/notebook/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/notebook/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/oleauto/makefile.wat b/samples/oleauto/makefile.wat
new file mode 100644
index 0000000000..994a25ce15
--- /dev/null
+++ b/samples/oleauto/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = oleauto
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/ownerdrw/makefile.wat b/samples/ownerdrw/makefile.wat
new file mode 100644
index 0000000000..4e6a3d8867
--- /dev/null
+++ b/samples/ownerdrw/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = ownerdrw
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/png/makefile.wat b/samples/png/makefile.wat
new file mode 100644
index 0000000000..65bdeb731d
--- /dev/null
+++ b/samples/png/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = pngdemo
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/printing/makefile.wat b/samples/printing/makefile.wat
new file mode 100644
index 0000000000..ebd7bff092
--- /dev/null
+++ b/samples/printing/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = printing
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/proplist/makefile.wat b/samples/proplist/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/proplist/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/regtest/makefile.wat b/samples/regtest/makefile.wat
new file mode 100644
index 0000000000..b673bbc73e
--- /dev/null
+++ b/samples/regtest/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = regtest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/resource/makefile.wat b/samples/resource/makefile.wat
index 0ad7f98a89..a2041fd638 100644
--- a/samples/resource/makefile.wat
+++ b/samples/resource/makefile.wat
@@ -1,42 +1,15 @@
 #
 # Makefile for WATCOM
 #
-# Created by D.Chubraev, chubraev@iem.ee.ethz.ch
-# 8 Nov 1994
+# Created by Julian Smart, January 1999
+# 
 #
 
-WXDIR = ..\.. 
+WXDIR = $(%WXWIN)
 
-!include $(WXDIR)\src\makewat.env
+PROGRAM = resource
+OBJECTS = $(PROGRAM).obj
 
-WXLIB = $(WXDIR)\lib
-NAME = hello
-LNK = $(name).lnk
-OBJS = $(name).obj 
+!include $(WXDIR)\src\makeprog.wat
 
-PRECOMP=
-
-all:    $(name).exe
-
-$(name).exe : $(OBJS) $(name).res $(LNK) $(WXLIB)\wx$(LEVEL).lib
-    wlink @$(LNK)
-    $(BINDCOMMAND) $(name).res
-
-$(name).res :      $(name).rc $(WXDIR)\include\msw\wx.rc
-     $(RC) $(RESFLAGS1) $(name).rc
-
-$(LNK) : makefile.wat
-    %create $(LNK)
-    @%append $(LNK) debug all
-    @%append $(LNK) system $(LINKOPTION)
-    @%append $(LNK) $(MINDATA)
-    @%append $(LNK) $(MAXDATA)
-    @%append $(LNK) $(STACK)
-    @%append $(LNK) name $(name)
-    @%append $(LNK) file $(WXLIB)\wx$(LEVEL).lib
-    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
-    @for %i in ($(OBJS)) do @%append $(LNK) file %i
-
-clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe *.rex
 
diff --git a/samples/sashtest/makefile.wat b/samples/sashtest/makefile.wat
new file mode 100644
index 0000000000..8c4081d4a0
--- /dev/null
+++ b/samples/sashtest/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = sashtest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/splitter/makefile.wat b/samples/splitter/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/splitter/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/tab/makefile.wat b/samples/tab/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/tab/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/taskbar/makefile.wat b/samples/taskbar/makefile.wat
new file mode 100644
index 0000000000..9c96500280
--- /dev/null
+++ b/samples/taskbar/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = tbtest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/thread/makefile.wat b/samples/thread/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/thread/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/toolbar/makefile.wat b/samples/toolbar/makefile.wat
new file mode 100644
index 0000000000..81a83e42a9
--- /dev/null
+++ b/samples/toolbar/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = test
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/treectrl/makefile.wat b/samples/treectrl/makefile.wat
new file mode 100644
index 0000000000..1e789d7fc5
--- /dev/null
+++ b/samples/treectrl/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = treetest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/typetest/makefile.wat b/samples/typetest/makefile.wat
new file mode 100644
index 0000000000..a96f825f07
--- /dev/null
+++ b/samples/typetest/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = typetest
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/validate/makefile.wat b/samples/validate/makefile.wat
new file mode 100644
index 0000000000..2d8327bf01
--- /dev/null
+++ b/samples/validate/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = validate
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/wxpoem/makefile.wat b/samples/wxpoem/makefile.wat
new file mode 100644
index 0000000000..b07d6af21e
--- /dev/null
+++ b/samples/wxpoem/makefile.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = wxpoem
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/wxsocket/client.wat b/samples/wxsocket/client.wat
new file mode 100644
index 0000000000..789db64157
--- /dev/null
+++ b/samples/wxsocket/client.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = client
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/samples/wxsocket/server.wat b/samples/wxsocket/server.wat
new file mode 100644
index 0000000000..2acfdf1115
--- /dev/null
+++ b/samples/wxsocket/server.wat
@@ -0,0 +1,15 @@
+#
+# Makefile for WATCOM
+#
+# Created by Julian Smart, January 1999
+# 
+#
+
+WXDIR = $(%WXWIN)
+
+PROGRAM = server
+OBJECTS = $(PROGRAM).obj
+
+!include $(WXDIR)\src\makeprog.wat
+
+
diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp
index 920e50e2cc..28aad19f7f 100644
--- a/src/common/ftp.cpp
+++ b/src/common/ftp.cpp
@@ -80,7 +80,7 @@ wxFTP::~wxFTP()
 ////////////////////////////////////////////////////////////////
 ////// wxFTP connect and login methods /////////////////////////
 ////////////////////////////////////////////////////////////////
-bool wxFTP::Connect(wxSockAddress& addr)
+bool wxFTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
 {
   if (!m_handler) {
     m_lastError = wxPROTO_NOHNDLR;
diff --git a/src/common/http.cpp b/src/common/http.cpp
index 221dddb876..c8f8b79a04 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -166,7 +166,7 @@ bool wxHTTP::Connect(const wxString& host)
   return TRUE;
 }
 
-bool wxHTTP::Connect(wxSockAddress& addr)
+bool wxHTTP::Connect(wxSockAddress& addr, bool WXUNUSED(wait))
 {
   struct sockaddr *raw_addr;
   size_t len;
diff --git a/src/common/list.cpp b/src/common/list.cpp
index f15ace4def..4cb8cf8f75 100644
--- a/src/common/list.cpp
+++ b/src/common/list.cpp
@@ -56,6 +56,8 @@
 // wxListKey
 // -----------------------------------------------------------------------------
 
+wxListKey wxDefaultListKey;
+
 bool wxListKey::operator==(wxListKeyValue value) const
 {
     switch ( m_keyType )
diff --git a/src/common/url.cpp b/src/common/url.cpp
index 46e26db8ce..f2d58e5dbb 100644
--- a/src/common/url.cpp
+++ b/src/common/url.cpp
@@ -250,7 +250,8 @@ wxInputStream *wxURL::GetInputStream(void)
 
     addr.Service(m_servname);
 
-    if (!m_protocol->Connect(addr)) {
+    if (!m_protocol->Connect(addr, TRUE)) // Watcom needs the 2nd arg for some reason
+    {
       m_error = wxURL_CONNERR;
       return NULL;
     }
@@ -281,7 +282,7 @@ void wxURL::SetDefaultProxy(const wxString& url_proxy)
   addr.Hostname(hostname);
   addr.Service(port);
   
-  g_proxy->Connect(addr);
+  g_proxy->Connect(addr, TRUE); // Watcom needs the 2nd arg for some reason
 }
 
 void wxURL::SetProxy(const wxString& url_proxy)
@@ -306,7 +307,7 @@ void wxURL::SetProxy(const wxString& url_proxy)
   addr.Hostname(hostname);
   addr.Service(port);
 
-  m_proxy.Connect(addr);
+  m_proxy.Connect(addr, TRUE); // Watcom needs the 2nd arg for some reason
 
   m_protocol = &m_proxy;
   m_protoname = "proxy";
diff --git a/src/makeprog.wat b/src/makeprog.wat
index 0a1784aa5d..c36dce6abf 100644
--- a/src/makeprog.wat
+++ b/src/makeprog.wat
@@ -21,12 +21,19 @@ $(LNK) : makefile.wat
     @%append $(LNK) $(STACK)
     @%append $(LNK) name $(PROGRAM).exe
     @%append $(LNK) file $(WXLIB)\wx.lib
+    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
     @for %i in ($(OBJECTS)) do @%append $(LNK) file %i
-
-#    @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
 #    @%append $(LNK) $(MINDATA)
 #    @%append $(LNK) $(MAXDATA)
 
 clean:   .SYMBOLIC
-    -erase *.obj *.bak *.err *.pch *.lib *.lnk *.res *.exe
+    -erase *.obj
+    -erase *.bak
+    -erase *.err
+    -erase *.pch
+    -erase *.lib
+    -erase *.lnk
+    -erase *.res
+    -erase *.exe
+    -erase *.lbc
 
diff --git a/src/makewat.env b/src/makewat.env
index 90f685fdfe..d52e0c2dac 100644
--- a/src/makewat.env
+++ b/src/makewat.env
@@ -51,7 +51,9 @@ WATLIBDIR   = $(WATCOMDIR)\lib386\nt
 MINDATA     =
 MAXDATA     =
 STACK       = option stack=64k
-EXTRALIBS   = $(WATLIBDIR)\ctl3d32.lib $(WATLIBDIR)\odbc32.lib
+EXTRALIBS   = $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib &
+      $(WATLIBDIR)\odbc32.lib $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
+      $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\uuid.lib
 IFLAGS      = -i=$(WXINC) -i=$(%watcom)\h;$(%watcom)\h\nt # -i=$(WXDIR)\include\wx\msw\gnuwin32
 RESFLAGS1   = -r -bt=nt /i$(WXDIR)\include
 RESFLAGS2   = -R $(name) /i$(WXDIR)\include
@@ -67,7 +69,7 @@ RESFLAGS2   = -R $(name) /i$(WXDIR)\include
 OPTFLAGS=/ox /5r
 
 # /d1 for line numbers only: anything else produces an enormous wx32.lib
-CPPFLAGS    = /bt=nt /w1 /D__WIN32__ /D__WIN95__ /D__WINDOWS__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 $(DEBUGFLAGS) /d__WXMSW__ $(EXTRACPPFLAGS) # /d__WATCOMC__
+CPPFLAGS    = /bt=nt /w1 /DWIN32 /D__WIN32__ /D__WIN95__ /D__WINDOWS__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 $(DEBUGFLAGS) /d__WXMSW__ $(EXTRACPPFLAGS) # /d__WATCOMC__
 
 .cpp.obj: # $< # .AUTODEPEND
     *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index d74f1ac230..5ea93d8c9e 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -561,7 +561,7 @@ int wxEntry(WXHINSTANCE hInstance,
             int nCmdShow,
             bool enterLoop)
 {
-#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) // take everything into a try-except block in release build
+#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) && !defined(__WATCOMC__) // take everything into a try-except block in release build
   try {
 #endif
 
@@ -631,7 +631,7 @@ int wxEntry(WXHINSTANCE hInstance,
   wxApp::CleanUp();
 
   return retValue;
-#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) // catch exceptions only in release build
+#if !defined(__WXDEBUG__) && !defined(__BORLANDC__) && !defined(__WATCOMC__) // catch exceptions only in release build
   }
   except ( EXCEPTION_EXECUTE_HANDLER ) {
     /*
diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat
index 12306011cb..7921d1c6cb 100644
--- a/src/msw/makefile.wat
+++ b/src/msw/makefile.wat
@@ -16,9 +16,8 @@ LIBTARGET   = $(WXLIB)\wx.lib
 DUMMY=dummydll
 # ODBCLIB     = ..\..\contrib\odbc\odbc32.lib
 
-EXTRATARGETS = # wxxpm
-EXTRATARGETSCLEAN = # clean_wxxpm
-
+EXTRATARGETS = xpm png zlib
+EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib
 GENDIR=$(WXDIR)\src\generic
 COMMDIR=$(WXDIR)\src\common
 XPMDIR=$(WXDIR)\src\xpm
@@ -114,7 +113,7 @@ COMMONOBJS = cmndata.obj &
 #  db.obj &
 #  dbtable.obj &
 
-MSWOBJS1 = &
+MSWOBJS = &
   accel.obj &
   app.obj &
   bitmap.obj &
@@ -169,7 +168,6 @@ MSWOBJS1 = &
   palette.obj &
   pen.obj &
   penwin.obj &
-  pnghand.obj &
   printdlg.obj &
   printwin.obj &
   radiobox.obj &
@@ -199,6 +197,8 @@ MSWOBJS1 = &
   wave.obj &
   window.obj &
 
+#  pnghand.obj &
+
 OLEOBJS = &
   droptgt.obj &
   dropsrc.obj &
@@ -207,33 +207,28 @@ OLEOBJS = &
   uuid.obj &
   automtn.obj
 
-XPMOBJECTS = 	crbuffri.obj&
-		crdatfri.obj&
-		create.obj crifrbuf.obj&
-		crifrdat.obj&
-		data.obj&
-		hashtab.obj misc.obj&
-		parse.obj rdftodat.obj&
-		rdftoi.obj&
-		rgb.obj scan.obj&
-		simx.obj wrffrdat.obj&
-		wrffrp.obj wrffri.obj
-
 # Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(OLEOBJS) # $(XPMOBJECTS)
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(OLEOBJS)
 
-all:        $(OBJECTS) $(LIBTARGET)
+all:        $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS)
 
 $(LIBTARGET) : $(OBJECTS)
     %create tmp.lbc
     @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
     wlib /b /c /n /p=512 $^@ @tmp.lbc
+
+#test : $(OBJECTS)
+#    %create tmp.lbc
+#    @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
+#    wlib /b /c /n /p=512 $^@ @tmp.lbc
+	
 	
-clean:   .SYMBOLIC
+clean:   $(EXTRATARGETSCLEAN)
     -erase *.obj
     -erase $(LIBTARGET)
     -erase *.pch
     -erase *.err
+    -erase *.lbc
 
 cleanall:   clean
 
@@ -825,15 +820,85 @@ wrffri.obj: $(XPMDIR)\wrffri.c
 wrffrp.obj: $(XPMDIR)\wrffrp.c
   *$(CC) $(CPPFLAGS) $(IFLAGS) $<
 
+OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O) deflate$(O) \
+  trees$(O) 
+OBJ2 = zutil$(O) inflate$(O) infblock$(O) inftrees$(O) infcodes$(O) \
+  infutil$(O) inffast$(O) 
+
+all: $(LIBTARGET)
+
+adler32.obj: adler32.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+compress.obj: compress.c zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+crc32.obj: crc32.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+gzio.obj: gzio.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infblock.obj: infblock.c zutil.h zlib.h zconf.h infblock.h inftrees.h\
+   infcodes.h infutil.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infcodes.obj: infcodes.c zutil.h zlib.h zconf.h inftrees.h infutil.h\
+   infcodes.h inffast.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inflate.obj: inflate.c zutil.h zlib.h zconf.h infblock.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
+	$(CC) -c $(CFLAGS) $*.c
+
+infutil.obj: infutil.c zutil.h zlib.h zconf.h inftrees.h infutil.h
+	$(CC) -c $(CFLAGS) $*.c
+
+inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
+	$(CC) -c $(CFLAGS) $*.c
+
+trees.obj: trees.c deflate.h zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+uncompr.obj: uncompr.c zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+zutil.obj: zutil.c zutil.h zlib.h zconf.h
+	$(CC) -c $(CFLAGS) $*.c
+
+xpm:   .SYMBOLIC
+    cd $(WXDIR)\src\xpm
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
+
+clean_xpm:   .SYMBOLIC
+    cd $(WXDIR)\src\xpm
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
+
+png:   .SYMBOLIC
+    cd $(WXDIR)\src\png
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
+
+clean_png:   .SYMBOLIC
+    cd $(WXDIR)\src\png
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
 
-#wxxpm:   .SYMBOLIC
-#    cd $(WXDIR)\contrib\wxxpm
-#    wmake -f makefile.wat all
-#    cd $(WXDIR)\src\msw
+zlib:   .SYMBOLIC
+    cd $(WXDIR)\src\zlib
+    wmake -f makefile.wat all
+    cd $(WXDIR)\src\msw
 
-#clean_wxxpm:   .SYMBOLIC
-#    cd $(WXDIR)\contrib\wxxpm
-#    wmake -f makefile.wat clean
-#    cd $(WXDIR)\src\msw
+clean_zlib:   .SYMBOLIC
+    cd $(WXDIR)\src\zlib
+    wmake -f makefile.wat clean
+    cd $(WXDIR)\src\msw
 
 
diff --git a/src/png/makefile.wat b/src/png/makefile.wat
new file mode 100644
index 0000000000..f3bc79b584
--- /dev/null
+++ b/src/png/makefile.wat
@@ -0,0 +1,40 @@
+#!/binb/wmake.exe
+#
+# File:		makefile.wat
+# Author:	Julian Smart
+# Created:	1998
+#
+# Makefile : Builds PNG library for Watcom C++, WIN32
+
+WXDIR = ..\..
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB = $(WXDIR)\lib
+
+LIBTARGET   = $(WXLIB)\png.lib
+
+OBJECTS = png.obj pngread.obj pngrtran.obj pngrutil.obj &
+ pngpread.obj pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj &
+ pngerror.obj pngmem.obj pngwio.obj pngrio.obj pngget.obj pngset.obj
+
+all:        $(OBJECTS) $(LIBTARGET)
+
+$(LIBTARGET) : $(OBJECTS)
+    %create tmp.lbc
+    @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
+    wlib /b /c /n /p=512 $^@ @tmp.lbc
+
+clean:   .SYMBOLIC
+    -erase *.obj
+    -erase $(LIBTARGET)
+    -erase *.pch
+    -erase *.err
+    -erase *.lbc
+
+cleanall:   clean
+
+#accel.obj:     $(MSWDIR)\accel.cpp
+#  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
+
diff --git a/src/xpm/makefile.wat b/src/xpm/makefile.wat
new file mode 100644
index 0000000000..4ce627d402
--- /dev/null
+++ b/src/xpm/makefile.wat
@@ -0,0 +1,54 @@
+#!/binb/wmake.exe
+#
+# File:		makefile.wat
+# Author:	Julian Smart
+# Created:	1998
+#
+# Makefile : Builds XPM library for Watcom C++, WIN32
+
+WXDIR = ..\..
+
+!include $(WXDIR)\src\makewat.env
+
+WXLIB = $(WXDIR)\lib
+
+LIBTARGET   = $(WXLIB)\xpm.lib
+
+OBJECTS = 	crbuffri.obj &
+		crdatfri.obj &
+		create.obj &
+        crifrbuf.obj &
+		crifrdat.obj &
+		data.obj &
+		hashtab.obj &
+        misc.obj &
+		parse.obj &
+        rdftodat.obj &
+		rdftoi.obj &
+		rgb.obj &
+        scan.obj &
+		simx.obj &
+        wrffrdat.obj &
+		wrffrp.obj &
+        wrffri.obj
+
+all:        $(OBJECTS) $(LIBTARGET)
+
+$(LIBTARGET) : $(OBJECTS)
+    %create tmp.lbc
+    @for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
+    wlib /b /c /n /p=512 $^@ @tmp.lbc
+
+clean:   .SYMBOLIC
+    -erase *.obj
+    -erase $(LIBTARGET)
+    -erase *.pch
+    -erase *.err
+    -erase *.lbc
+
+cleanall:   clean
+
+#accel.obj:     $(MSWDIR)\accel.cpp
+#  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
+
diff --git a/src/zlib/makefile.wat b/src/zlib/makefile.wat
index e8ee232db4..7f196ab011 100644
--- a/src/zlib/makefile.wat
+++ b/src/zlib/makefile.wat
@@ -29,7 +29,9 @@ OBJP1=adler32$(O)+compress$(O)+crc32$(O)+gzio$(O)+uncompr$(O)+deflate$(O)
 OBJP2=trees$(O)+zutil$(O)+inflate$(O)+infblock$(O)+inftrees$(O)+infcodes$(O)
 OBJP3=infutil$(O)+inffast$(O)
 
-all: test
+# all: test
+
+all: $(LIBTARGET)
 
 adler32.obj: adler32.c zutil.h zlib.h zconf.h
 	$(CC) $(CFLAGS) $*.c
-- 
2.50.0

