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
31 # change/remove this if you want to create programs for older Windows versions,
32 # increase the version to be able to use more Win2K+-only features
33 WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300
35 # optimize for space/time: /os or /ot
43 ###############################################################################
44 # You shouldn't have to modify anything after this point
45 ###############################################################################
48 .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
51 !error WATCOM environment variable must be set!
56 !error WXWIN environment variable must be set!
71 DEBUGFLAGS = /D__WXDEBUG__
72 DEBUGCFLAGS = $(DEBUGFLAGS) /d2
73 DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
83 # TOOLKIT is used as the name of lib subdir containing wx/setup.h
84 # BASEDIRPREFIX is used to construct OUTPUTDIR
95 ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
97 # set the things which depend on debug/release
99 # note that the values for LIBPAGESIZE are minimal possible, the library
100 # doesn't link (Error! Library too large) with values smaller than given
102 CONFIGURATION=Release
109 # set OUTPUTDIR to the directory to be used for the .obj files created during
110 # the build (under $WXWIN)
112 OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
116 PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
119 # the basename of the library
120 LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
122 # only LEVEL=386 is currently supported, 16 bit compilation is probably broken
129 WATLIBDIR = $(WATCOMDIR)\lib386\nt
130 STACK = option stack=64k
131 LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
132 $(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
133 $(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
135 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
136 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
137 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
139 $(WATLIBDIR)\comctl32.lib &
140 $(WATLIBDIR)\comdlg32.lib &
141 $(WATLIBDIR)\odbc32.lib &
142 $(WATLIBDIR)\ole32.lib &
143 $(WATLIBDIR)\oleaut32.lib &
144 $(WATLIBDIR)\opengl32.lib &
145 $(WATLIBDIR)\uuid.lib
146 IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
147 -i=$(%watcom)\h;$(%watcom)\h\nt &
148 -i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
149 -i=$(WXDIR)\include\wx\msw\gnuwin32
150 RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
152 # NB: /bm switch is needed for thread-safe runtime, if you don't use
153 # wxThread you may remove it
154 CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
156 CPPFLAGS += /dwxUSE_GUI=0
159 # zm and zv as well as the liker options below are used to make the resulting
161 CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) /zm
162 CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /zm /zv /w=8 $(EXTRACXXFLAGS)
163 LDFLAGS = option eliminate, vfremoval
165 .cpp.obj: # $< # .AUTODEPEND
166 *$(CXX) $(CXXFLAGS) $<
168 .c.obj: # $< # .AUTODEPEND
171 defaulttarget: all .SYMBOLIC
174 -erase $(OUTPUTDIR)watcom.pch