FINAL=0
WATCOMDIR=$(%WATCOM)
-#.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
-# Set this to win386 if compiling under WIN386 mode, or
-# to windows for normal 16-bit Windows, nt if compiling for WIN32s/NT
-MODE= nt # windows
+.EXTENSIONS:
+.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
-WXDIR = c:\wx
-WXINC = $(WXDIR)\include\msw
-WXBASEINC = $(WXDIR)\include\base
+#WXDIR = d:\wx2\wxwind~1
+WXDIR = $(%WXWIN)
+WXINC = $(WXDIR)\include
# Suffixes
OBJSUFF=obj
PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch
!endif
-RC = wrc
-
-!ifeq MODE win386
-
-##### WIN386 OPTIONS
-
-# Set LEVEL to 386 if using 32-bit compilation
-LEVEL = 386
-CCC = wpp$(LEVEL)
-CC = wcc$(LEVEL)
-OS_TARGET = win386
-MODEL =
-LINKOPTION = win386
-BINDCOMMAND = wbind
-WATLIBDIR = $(WATCOMDIR)\lib386\win
-MINDATA = option mindata=100K
-MAXDATA = option maxdata=100K
-STACK = option stack=64k
-EXTRALIBS = $(WXDIR)\contrib\ctl3d\ctl3d32.obj
-IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\win
-RESFLAGS1 = -r -bt=windows /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
-RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
+!ifeq WXDEBUG 1
+DEBUGFLAGS = /D__WXDEBUG__ /o1
DEBUGINFO = debug all
-
-#CPPFLAGS = /zw /w1 /zq /d2 /d__WIN386__ /zt4 $(MODEL) /d__WINDOWS__
-CPPFLAGS = /zw /w1 /zq /d1 /d__WIN386__ $(MODEL) $(PRECOMP) /d__WINDOWS__ $(EXTRACPPFLAGS)
-
+!else
+DEBUGFLAGS =
+DEBUGINFO =
!endif
-#### END WIN386 MODE
-
-!ifeq MODE windows
-##### 16-BIT WINDOWS OPTIONS
-
-# Set LEVEL to 386 if using 32-bit compilation
-LEVEL =
-CCC = wpp$(LEVEL)
-CC = wcc$(LEVEL)
-OS_TARGET = windows
-MODEL =/ml
-LINKOPTION = windows
-BINDCOMMAND = echo
-WATLIBDIR = $(WATCOMDIR)\lib286\win
-MINDATA =
-MAXDATA =
-STACK =
-EXTRALIBS=$(WATLIBDIR)\shell.lib $(WATLIBDIR)\ddeml.lib $(WATLIBDIR)\ctl3d.lib $(WATLIBDIR)\commdlg.lib $(WATLIBDIR)\mmsystem.lib
-IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa
-RESFLAGS1 = -r -bt=windows -i=$(WXINC) -i=$(WXDIR)\contrib\fafa
-RESFLAGS2 = -R
-DEBUGINFO = debug all
-
-#-i=$(WXDIR)\contrib\itsybits
-
-# Note: I've added the data threshold (/zt4) for 16-bit operation,
-# or we get link failure (TEXT segment overflow). Is this OK for
-# 32-bit mode also? -- JACS
-# An alternative might be /zc (put string literals in code segment).
-#CPPFLAGS = /zw /w1 /zq /d1 /zt4 $(MODEL) /d__WINDOWS__
-CPPFLAGS = /zw /w2 /zq /d1 $(MODEL) $(PRECOMP) /d__WINDOWS__ $(EXTRACPPFLAGS)
-
-!endif
-#### END WINDOWS MODE
-
-!ifeq MODE nt
-
-##### NT OPTIONS
+RC = wrc
LEVEL = 386
CCC = wpp$(LEVEL)
MINDATA =
MAXDATA =
STACK = option stack=64k
-EXTRALIBS = $(WATLIBDIR)\ctl3d32.lib $(WATLIBDIR)\odbc32.lib
-IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\nt
-RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
-RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
-DEBUGINFO = debug all # Linking: comment out if operating in a non-debuggable environment
-
-#-i=$(WXDIR)\contrib\itsybits
+LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\tiff.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\xpm.lib &
+ $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
+ $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\opengl32.lib &
+ $(WATLIBDIR)\uuid.lib $(WXDIR)\lib\watcom\odbc32.lib
+IFLAGS = -i=$(WXINC) -i=$(WXDIR)\contrib\include -i=$(%watcom)\h;$(%watcom)\h\nt;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff;$(WXDIR)\include\wx\msw\gnuwin32
+RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include
+RESFLAGS2 = -R $(name) /i$(WXDIR)\include /i$(WXDIR)\contrib\include
# Here are some possible optimization flags:
# /5r Pentium timings
# The Watcom-recommended flags for optimum Pentium speed are:
# /oneatx /zp4 /5 /fpi87 /fp5
-OPTFLAGS=/ox /5r # /DWXDEBUG=1
+OPTFLAGS=/ox /5r
# /d1 for line numbers only: anything else produces an enormous wx32.lib
-CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WINDOWS__ $(EXTRACPPFLAGS)
-
-!endif
-#### END NT MODE
+CPPFLAGS = /bt=nt /w1 /DWIN32 /D__WIN32__ /D__WIN95__ /D__WINDOWS__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) $(DEBUGFLAGS) /d__WXMSW__ $(EXTRACPPFLAGS) # /d__WATCOMC__
.cpp.obj: # $< # .AUTODEPEND
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-# %create tmp.lbc
-# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
-# echo $<
-# $(CCC) @tmp.lbc
-
.c.obj: # $< # .AUTODEPEND
*$(CC) $(CPPFLAGS) $(IFLAGS) $<