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