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)
85 # set OUTPUTDIR to the directory to be used for the .obj files created during
86 # the build (under $WXWIN)
88 OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
92 PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
95 # the basename of the library
96 LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
98 # You shouldn't have to modify anything after this point
99 ########################################################
101 # only LEVEL=386 is currently supported, 16 bit compilation is probably broken
106 WINVERFLAGS = /dWINVER=0x400
108 WATLIBDIR = $(WATCOMDIR)\lib386\nt
109 STACK = option stack=64k
110 LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
111 $(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
112 $(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
114 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
115 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
116 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
118 $(WATLIBDIR)\comctl32.lib &
119 $(WATLIBDIR)\comdlg32.lib &
120 $(WATLIBDIR)\odbc32.lib &
121 $(WATLIBDIR)\ole32.lib &
122 $(WATLIBDIR)\oleaut32.lib &
123 $(WATLIBDIR)\opengl32.lib &
124 $(WATLIBDIR)\uuid.lib
125 IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
126 -i=$(%watcom)\h;$(%watcom)\h\nt &
127 -i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
128 -i=$(WXDIR)\include\wx\msw\gnuwin32
129 RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
131 # Here are some possible optimization flags:
132 # /5r Pentium timings
133 # /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
134 # /ox Standard optimizations
135 # /or Reordering for Pentium timings (included in /ox)
136 # The Watcom-recommended flags for optimum Pentium speed are:
137 # /oneatx /zp4 /5 /fpi87 /fp5
139 # OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
141 # optimize for space/time: /os or /ot
148 # NB: /bm switch is needed for thread-safe runtime, if you don't use
149 # wxThread you may remove it
150 CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
152 CPPFLAGS += /dwxUSE_GUI=0
155 CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
156 CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
158 .cpp.obj: # $< # .AUTODEPEND
159 *$(CXX) $(CXXFLAGS) $<
161 .c.obj: # $< # .AUTODEPEND
164 defaulttarget: all .SYMBOLIC
167 -erase $(OUTPUTDIR)watcom.pch