2 # Purpose: Watcom environments for wxWindows makefiles.
3 # Author: Julian Smart and others
5 # The main things to change are:
7 # WATCOM: set to where the compiler is installed
8 # WXDIR: set to where the wxWindows is installed
9 # MODE: set to windows [16 bit windows], nt [win32s], or win386 [32-bit non-WIN32]
13 #.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
15 # Set this to win386 if compiling under WIN386 mode, or
16 # to windows for normal 16-bit Windows, nt if compiling for WIN32s/NT
20 WXINC = $(WXDIR)\include\msw
21 WXBASEINC = $(WXDIR)\include\base
30 PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch
39 # Set LEVEL to 386 if using 32-bit compilation
47 WATLIBDIR = $(WATCOMDIR)\lib386\win
48 MINDATA = option mindata=100K
49 MAXDATA = option maxdata=100K
50 STACK = option stack=64k
51 EXTRALIBS = $(WXDIR)\contrib\ctl3d\ctl3d32.obj
52 IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\win
53 RESFLAGS1 = -r -bt=windows /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
54 RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
57 #CPPFLAGS = /zw /w1 /zq /d2 /d__WIN386__ /zt4 $(MODEL) /d__WINDOWS__
58 CPPFLAGS = /zw /w1 /zq /d1 /d__WIN386__ $(MODEL) $(PRECOMP) /d__WINDOWS__ $(EXTRACPPFLAGS)
65 ##### 16-BIT WINDOWS OPTIONS
67 # Set LEVEL to 386 if using 32-bit compilation
75 WATLIBDIR = $(WATCOMDIR)\lib286\win
79 EXTRALIBS=$(WATLIBDIR)\shell.lib $(WATLIBDIR)\ddeml.lib $(WATLIBDIR)\ctl3d.lib $(WATLIBDIR)\commdlg.lib $(WATLIBDIR)\mmsystem.lib
80 IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa
81 RESFLAGS1 = -r -bt=windows -i=$(WXINC) -i=$(WXDIR)\contrib\fafa
85 #-i=$(WXDIR)\contrib\itsybits
87 # Note: I've added the data threshold (/zt4) for 16-bit operation,
88 # or we get link failure (TEXT segment overflow). Is this OK for
89 # 32-bit mode also? -- JACS
90 # An alternative might be /zc (put string literals in code segment).
91 #CPPFLAGS = /zw /w1 /zq /d1 /zt4 $(MODEL) /d__WINDOWS__
92 CPPFLAGS = /zw /w2 /zq /d1 $(MODEL) $(PRECOMP) /d__WINDOWS__ $(EXTRACPPFLAGS)
106 # If you use win95, assumptions will be made about Win95 icon format etc.
107 # so nt_win is probably better for simultaneous Win32s/Win95/NT operation.
108 LINKOPTION = nt_win # win95
110 WATLIBDIR = $(WATCOMDIR)\lib386\nt
113 STACK = option stack=64k
114 EXTRALIBS = $(WATLIBDIR)\ctl3d32.lib $(WATLIBDIR)\odbc32.lib
115 IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\nt
116 RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
117 RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
118 DEBUGINFO = debug all # Linking: comment out if operating in a non-debuggable environment
120 #-i=$(WXDIR)\contrib\itsybits
122 # Here are some possible optimization flags:
123 # /5r Pentium timings
124 # /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
125 # /ox Standard optimizations
126 # /or Reordering for Pentium timings (included in /ox)
127 # The Watcom-recommended flags for optimum Pentium speed are:
128 # /oneatx /zp4 /5 /fpi87 /fp5
130 OPTFLAGS=/ox /5r # /DWXDEBUG=1
132 # /d1 for line numbers only: anything else produces an enormous wx32.lib
133 CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WINDOWS__ $(EXTRACPPFLAGS)
138 .cpp.obj: # $< # .AUTODEPEND
139 *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
142 # @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
146 .c.obj: # $< # .AUTODEPEND
147 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
149 # This doesn't work for wcc
151 # @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
156 @echo Please give a target for wxWin makefiles: the usual one is 'all'.
159 -erase $(WXDIR)\src\msw\watcom.pch