]> git.saurik.com Git - wxWidgets.git/blame - src/makewat.env
Removed some deprecated usage
[wxWidgets.git] / src / makewat.env
CommitLineData
a0499e2f
VZ
1###############################################################################
2# File: src/makewat.env
2bda0e17
KB
3# Purpose: Watcom environments for wxWindows makefiles.
4# Author: Julian Smart and others
a0499e2f
VZ
5# Version: $Id$
6###############################################################################
7
8# The following environment variables must be set:
2bda0e17
KB
9#
10# WATCOM: set to where the compiler is installed
a0499e2f
VZ
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
2bda0e17 20
a0499e2f 21# set FINAL=1 to disable debug and enable optimizations
5e3841bf 22!ifndef FINAL
2bda0e17 23FINAL=0
5e3841bf 24!endif
a0499e2f
VZ
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
2bda0e17 30
205b0c9c
VZ
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
33WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300
34
35# optimize for space/time: /os or /ot
10e8e34f
VZ
36#
37# NB: at least with OpenWatcom 1.0 using /ox leads to buggy code, don't use it
205b0c9c
VZ
38!ifeq FINAL 1
39OPTFLAGS=/oails /5r
40!else
41OPTFLAGS=/od
42!endif
43
44
45###############################################################################
46# You shouldn't have to modify anything after this point
47###############################################################################
48
7be1f0d9
JS
49.EXTENSIONS:
50.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
2bda0e17 51
a0499e2f
VZ
52!ifndef %WATCOM
53!error WATCOM environment variable must be set!
54!endif
55WATCOMDIR=$(%WATCOM)
56
57!ifndef %WXWIN
58!error WXWIN environment variable must be set!
59!endif
7be1f0d9 60WXDIR = $(%WXWIN)
2bda0e17
KB
61
62# Suffixes
63OBJSUFF=obj
64SRCSUFF=cpp
65
a0499e2f 66!ifeq FINAL 1
b2aef89b 67WXDEBUG=0
a0499e2f
VZ
68!else
69WXDEBUG=1
2bda0e17
KB
70!endif
71
7be1f0d9 72!ifeq WXDEBUG 1
a0499e2f
VZ
73DEBUGFLAGS = /D__WXDEBUG__
74DEBUGCFLAGS = $(DEBUGFLAGS) /d2
75DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
2bda0e17 76DEBUGINFO = debug all
a0499e2f 77DEBUGSUFFIX = d
7be1f0d9 78!else
a0499e2f
VZ
79DEBUGCFLAGS =
80DEBUGCXXFLAGS =
7be1f0d9 81DEBUGINFO =
a0499e2f
VZ
82DEBUGSUFFIX =
83!endif
84
85# TOOLKIT is used as the name of lib subdir containing wx/setup.h
86# BASEDIRPREFIX is used to construct OUTPUTDIR
87!ifeq wxUSE_GUI 0
88TOOLKIT = base
89BASEDIRPREFIX = Base
205b0c9c 90LINKSYSTEM = nt
a0499e2f
VZ
91!else
92TOOLKIT = msw
205b0c9c 93LINKSYSTEM = nt_win
a0499e2f
VZ
94BASEDIRPREFIX =
95!endif
96
97ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
98
efa7066d
VZ
99# set the things which depend on debug/release
100#
101# note that the values for LIBPAGESIZE are minimal possible, the library
102# doesn't link (Error! Library too large) with values smaller than given
a0499e2f
VZ
103!ifeq FINAL 1
104CONFIGURATION=Release
efa7066d 105LIBPAGESIZE=/p=1024
a0499e2f
VZ
106!else
107CONFIGURATION=Debug
efa7066d 108LIBPAGESIZE=/p=2048
2bda0e17 109!endif
2bda0e17 110
a0499e2f
VZ
111# set OUTPUTDIR to the directory to be used for the .obj files created during
112# the build (under $WXWIN)
113!ifndef OUTPUTDIR
114OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
115!endif
2bda0e17 116
a0499e2f
VZ
117!ifneq NOPRECOMP 1
118PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
119!endif
120
121# the basename of the library
122LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
123
a0499e2f 124# only LEVEL=386 is currently supported, 16 bit compilation is probably broken
2bda0e17 125LEVEL = 386
a0499e2f
VZ
126CXX = wpp$(LEVEL)
127CC = wcc$(LEVEL)
efa7066d 128LIB = wlib /q
a0499e2f 129RC = wrc
2bda0e17
KB
130BINDCOMMAND = wrc
131WATLIBDIR = $(WATCOMDIR)\lib386\nt
2bda0e17 132STACK = option stack=64k
a0499e2f
VZ
133LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
134 $(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
135 $(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
136!ifneq wxUSE_GUI 0
137 $(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
138 $(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
139 $(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
140!endif
141 $(WATLIBDIR)\comctl32.lib &
142 $(WATLIBDIR)\comdlg32.lib &
143 $(WATLIBDIR)\odbc32.lib &
144 $(WATLIBDIR)\ole32.lib &
145 $(WATLIBDIR)\oleaut32.lib &
146 $(WATLIBDIR)\opengl32.lib &
147 $(WATLIBDIR)\uuid.lib
148IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
149 -i=$(%watcom)\h;$(%watcom)\h\nt &
150 -i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
151 -i=$(WXDIR)\include\wx\msw\gnuwin32
152RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
2bda0e17 153
9f51f2b6
VZ
154# NB: /bm switch is needed for thread-safe runtime, if you don't use
155# wxThread you may remove it
a0499e2f
VZ
156CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
157!ifeq wxUSE_GUI 0
158CPPFLAGS += /dwxUSE_GUI=0
159!endif
160
205b0c9c
VZ
161# zm and zv as well as the liker options below are used to make the resulting
162# .exe smaller
163CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) /zm
164CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /zm /zv /w=8 $(EXTRACXXFLAGS)
165LDFLAGS = option eliminate, vfremoval
2bda0e17
KB
166
167.cpp.obj: # $< # .AUTODEPEND
a0499e2f 168 *$(CXX) $(CXXFLAGS) $<
2bda0e17 169
2bda0e17 170.c.obj: # $< # .AUTODEPEND
a0499e2f 171 *$(CC) $(CFLAGS) $<
2bda0e17 172
a0499e2f 173defaulttarget: all .SYMBOLIC
2bda0e17
KB
174
175erasepch: .SYMBOLIC
a0499e2f 176 -erase $(OUTPUTDIR)watcom.pch