]> git.saurik.com Git - wxWidgets.git/blob - src/makewat.env
removed wxCURSOR_SIZING (we now use the std one)
[wxWidgets.git] / src / makewat.env
1 ###############################################################################
2 # File: src/makewat.env
3 # Purpose: Watcom environments for wxWindows makefiles.
4 # Author: Julian Smart and others
5 # Version: $Id$
6 ###############################################################################
7
8 # The following environment variables must be set:
9 #
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
13 # LIB: same as PATH
14 # INCLUDE: same as PATH
15
16 # set wxUSE_GUI=0 to build wxBase instead of (default) wxMSW
17 !ifndef wxUSE_GUI
18 wxUSE_GUI=1
19 !endif
20
21 # set FINAL=1 to disable debug and enable optimizations
22 !ifndef FINAL
23 FINAL=0
24 !endif
25
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
28 # compiler
29 WATCOM_SUFFIX=_w
30
31 .EXTENSIONS:
32 .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
33
34 !ifndef %WATCOM
35 !error WATCOM environment variable must be set!
36 !endif
37 WATCOMDIR=$(%WATCOM)
38
39 !ifndef %WXWIN
40 !error WXWIN environment variable must be set!
41 !endif
42 WXDIR = $(%WXWIN)
43
44 # Suffixes
45 OBJSUFF=obj
46 SRCSUFF=cpp
47
48 !ifeq FINAL 1
49 WXDEBUG=0
50 !else
51 WXDEBUG=1
52 !endif
53
54 !ifeq WXDEBUG 1
55 DEBUGFLAGS = /D__WXDEBUG__
56 DEBUGCFLAGS = $(DEBUGFLAGS) /d2
57 DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
58 DEBUGINFO = debug all
59 DEBUGSUFFIX = d
60 !else
61 DEBUGCFLAGS =
62 DEBUGCXXFLAGS =
63 DEBUGINFO =
64 DEBUGSUFFIX =
65 !endif
66
67 # TOOLKIT is used as the name of lib subdir containing wx/setup.h
68 # BASEDIRPREFIX is used to construct OUTPUTDIR
69 !ifeq wxUSE_GUI 0
70 TOOLKIT = base
71 BASEDIRPREFIX = Base
72 LINKOPTION = nt
73 !else
74 TOOLKIT = msw
75 LINKOPTION = nt_win
76 BASEDIRPREFIX =
77 !endif
78
79 ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
80
81 # set the things which depend on debug/release
82 #
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
85 !ifeq FINAL 1
86 CONFIGURATION=Release
87 LIBPAGESIZE=/p=1024
88 !else
89 CONFIGURATION=Debug
90 LIBPAGESIZE=/p=2048
91 !endif
92
93 # set OUTPUTDIR to the directory to be used for the .obj files created during
94 # the build (under $WXWIN)
95 !ifndef OUTPUTDIR
96 OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
97 !endif
98
99 !ifneq NOPRECOMP 1
100 PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
101 !endif
102
103 # the basename of the library
104 LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
105
106 # You shouldn't have to modify anything after this point
107 ########################################################
108
109 # only LEVEL=386 is currently supported, 16 bit compilation is probably broken
110 LEVEL = 386
111 CXX = wpp$(LEVEL)
112 CC = wcc$(LEVEL)
113 LIB = wlib /q
114 RC = wrc
115 WINVERFLAGS = /dWINVER=0x400
116 BINDCOMMAND = wrc
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 &
122 !ifneq wxUSE_GUI 0
123 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
124 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
125 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
126 !endif
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)
139
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
147 # for PPro:
148 # OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
149 #
150 # optimize for space/time: /os or /ot
151 !ifeq FINAL 1
152 OPTFLAGS=/oails /5r
153 !else
154 OPTFLAGS=/od
155 !endif
156
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)
160 !ifeq wxUSE_GUI 0
161 CPPFLAGS += /dwxUSE_GUI=0
162 !endif
163
164 CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
165 CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
166
167 .cpp.obj: # $< # .AUTODEPEND
168 *$(CXX) $(CXXFLAGS) $<
169
170 .c.obj: # $< # .AUTODEPEND
171 *$(CC) $(CFLAGS) $<
172
173 defaulttarget: all .SYMBOLIC
174
175 erasepch: .SYMBOLIC
176 -erase $(OUTPUTDIR)watcom.pch