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
24 # set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to
25 # something Watcom-specific if you want to build wxWindows with more than one
30 .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
33 !error WATCOM environment variable must be set!
38 !error WXWIN environment variable must be set!
53 DEBUGFLAGS = /D__WXDEBUG__
54 DEBUGCFLAGS = $(DEBUGFLAGS) /d2
55 DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
65 # TOOLKIT is used as the name of lib subdir containing wx/setup.h
66 # BASEDIRPREFIX is used to construct OUTPUTDIR
77 ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
79 # set the things which depend on debug/release
81 # note that the values for LIBPAGESIZE are minimal possible, the library
82 # doesn't link (Error! Library too large) with values smaller than given
91 # set OUTPUTDIR to the directory to be used for the .obj files created during
92 # the build (under $WXWIN)
94 OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
98 PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
101 # the basename of the library
102 LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
104 # You shouldn't have to modify anything after this point
105 ########################################################
107 # only LEVEL=386 is currently supported, 16 bit compilation is probably broken
113 WINVERFLAGS = /dWINVER=0x400
115 WATLIBDIR = $(WATCOMDIR)\lib386\nt
116 STACK = option stack=64k
117 LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
118 $(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
119 $(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
121 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
122 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
123 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
125 $(WATLIBDIR)\comctl32.lib &
126 $(WATLIBDIR)\comdlg32.lib &
127 $(WATLIBDIR)\odbc32.lib &
128 $(WATLIBDIR)\ole32.lib &
129 $(WATLIBDIR)\oleaut32.lib &
130 $(WATLIBDIR)\opengl32.lib &
131 $(WATLIBDIR)\uuid.lib
132 IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
133 -i=$(%watcom)\h;$(%watcom)\h\nt &
134 -i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
135 -i=$(WXDIR)\include\wx\msw\gnuwin32
136 RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
138 # Here are some possible optimization flags:
139 # /5r Pentium timings
140 # /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
141 # /ox Standard optimizations
142 # /or Reordering for Pentium timings (included in /ox)
143 # The Watcom-recommended flags for optimum Pentium speed are:
144 # /oneatx /zp4 /5 /fpi87 /fp5
146 # OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
148 # optimize for space/time: /os or /ot
155 # NB: /bm switch is needed for thread-safe runtime, if you don't use
156 # wxThread you may remove it
157 CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
159 CPPFLAGS += /dwxUSE_GUI=0
162 CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
163 CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
165 .cpp.obj: # $< # .AUTODEPEND
166 *$(CXX) $(CXXFLAGS) $<
168 .c.obj: # $< # .AUTODEPEND
171 defaulttarget: all .SYMBOLIC
174 -erase $(OUTPUTDIR)watcom.pch