1 ###############################################################################
2 # File: src/makewat.env
3 # Purpose: Watcom environments for wxWindows makefiles.
4 # Author: Julian Smart and others
6 ###############################################################################
8 # The following environment variables must be set:
10 # WATCOM: set to where the compiler is installed
11 # WXWIN: set to where the wxWindows is installed
12 # PATH: set correctly, i.e. contains all Watcom directories
14 # INCLUDE: same as PATH
16 # set wxUSE_GUI=0 to build wxBase instead of (default) wxMSW
21 # set FINAL=1 to disable debug and enable optimizations
26 # set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to
27 # something Watcom-specific if you want to build wxWindows with more than one
32 .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
35 !error WATCOM environment variable must be set!
40 !error WXWIN environment variable must be set!
55 DEBUGFLAGS = /D__WXDEBUG__
56 DEBUGCFLAGS = $(DEBUGFLAGS) /d2
57 DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
67 # TOOLKIT is used as the name of lib subdir containing wx/setup.h
68 # BASEDIRPREFIX is used to construct OUTPUTDIR
79 ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
81 # set the things which depend on debug/release
83 # note that the values for LIBPAGESIZE are minimal possible, the library
84 # doesn't link (Error! Library too large) with values smaller than given
93 # set OUTPUTDIR to the directory to be used for the .obj files created during
94 # the build (under $WXWIN)
96 OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
100 PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
103 # the basename of the library
104 LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
106 # You shouldn't have to modify anything after this point
107 ########################################################
109 # only LEVEL=386 is currently supported, 16 bit compilation is probably broken
115 WINVERFLAGS = /dWINVER=0x400
117 WATLIBDIR = $(WATCOMDIR)\lib386\nt
118 STACK = option stack=64k
119 LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
120 $(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
121 $(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
123 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
124 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
125 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
127 $(WATLIBDIR)\comctl32.lib &
128 $(WATLIBDIR)\comdlg32.lib &
129 $(WATLIBDIR)\odbc32.lib &
130 $(WATLIBDIR)\ole32.lib &
131 $(WATLIBDIR)\oleaut32.lib &
132 $(WATLIBDIR)\opengl32.lib &
133 $(WATLIBDIR)\uuid.lib
134 IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
135 -i=$(%watcom)\h;$(%watcom)\h\nt &
136 -i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
137 -i=$(WXDIR)\include\wx\msw\gnuwin32
138 RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
140 # Here are some possible optimization flags:
141 # /5r Pentium timings
142 # /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
143 # /ox Standard optimizations
144 # /or Reordering for Pentium timings (included in /ox)
145 # The Watcom-recommended flags for optimum Pentium speed are:
146 # /oneatx /zp4 /5 /fpi87 /fp5
148 # OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
150 # optimize for space/time: /os or /ot
157 # NB: /bm switch is needed for thread-safe runtime, if you don't use
158 # wxThread you may remove it
159 CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
161 CPPFLAGS += /dwxUSE_GUI=0
164 CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
165 CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
167 .cpp.obj: # $< # .AUTODEPEND
168 *$(CXX) $(CXXFLAGS) $<
170 .c.obj: # $< # .AUTODEPEND
173 defaulttarget: all .SYMBOLIC
176 -erase $(OUTPUTDIR)watcom.pch