]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/makewat.env
no new install of event handler
[wxWidgets.git] / src / makewat.env
... / ...
CommitLineData
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
18wxUSE_GUI=1
19!endif
20
21# set FINAL=1 to disable debug and enable optimizations
22!ifndef FINAL
23FINAL=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
29WATCOM_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
37WATCOMDIR=$(%WATCOM)
38
39!ifndef %WXWIN
40!error WXWIN environment variable must be set!
41!endif
42WXDIR = $(%WXWIN)
43
44# Suffixes
45OBJSUFF=obj
46SRCSUFF=cpp
47
48!ifeq FINAL 1
49WXDEBUG=0
50!else
51WXDEBUG=1
52!endif
53
54!ifeq WXDEBUG 1
55DEBUGFLAGS = /D__WXDEBUG__
56DEBUGCFLAGS = $(DEBUGFLAGS) /d2
57DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
58DEBUGINFO = debug all
59DEBUGSUFFIX = d
60!else
61DEBUGCFLAGS =
62DEBUGCXXFLAGS =
63DEBUGINFO =
64DEBUGSUFFIX =
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
70TOOLKIT = base
71BASEDIRPREFIX = Base
72LINKOPTION = nt
73!else
74TOOLKIT = msw
75LINKOPTION = nt_win
76BASEDIRPREFIX =
77!endif
78
79ARCHINCDIR=$(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
86CONFIGURATION=Release
87LIBPAGESIZE=/p=1024
88!else
89CONFIGURATION=Debug
90LIBPAGESIZE=/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
96OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
97!endif
98
99!ifneq NOPRECOMP 1
100PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
101!endif
102
103# the basename of the library
104LIBNAME=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
110LEVEL = 386
111CXX = wpp$(LEVEL)
112CC = wcc$(LEVEL)
113LIB = wlib /q
114RC = wrc
115WINVERFLAGS = /dWINVER=0x400
116BINDCOMMAND = wrc
117WATLIBDIR = $(WATCOMDIR)\lib386\nt
118STACK = option stack=64k
119LIBS = $(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
134IFLAGS = -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
138RESFLAGS = -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
152OPTFLAGS=/oails /5r
153!else
154OPTFLAGS=/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
159CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
160!ifeq wxUSE_GUI 0
161CPPFLAGS += /dwxUSE_GUI=0
162!endif
163
164CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
165CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
166
167.cpp.obj: # $< # .AUTODEPEND
168 *$(CXX) $(CXXFLAGS) $<
169
170.c.obj: # $< # .AUTODEPEND
171 *$(CC) $(CFLAGS) $<
172
173defaulttarget: all .SYMBOLIC
174
175erasepch: .SYMBOLIC
176 -erase $(OUTPUTDIR)watcom.pch