]> git.saurik.com Git - wxWidgets.git/blame - src/makewat.env
Make wxr resources work in Unicode mode.
[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
7be1f0d9
JS
31.EXTENSIONS:
32.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
2bda0e17 33
a0499e2f
VZ
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
7be1f0d9 42WXDIR = $(%WXWIN)
2bda0e17
KB
43
44# Suffixes
45OBJSUFF=obj
46SRCSUFF=cpp
47
a0499e2f 48!ifeq FINAL 1
b2aef89b 49WXDEBUG=0
a0499e2f
VZ
50!else
51WXDEBUG=1
2bda0e17
KB
52!endif
53
7be1f0d9 54!ifeq WXDEBUG 1
a0499e2f
VZ
55DEBUGFLAGS = /D__WXDEBUG__
56DEBUGCFLAGS = $(DEBUGFLAGS) /d2
57DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
2bda0e17 58DEBUGINFO = debug all
a0499e2f 59DEBUGSUFFIX = d
7be1f0d9 60!else
a0499e2f
VZ
61DEBUGCFLAGS =
62DEBUGCXXFLAGS =
7be1f0d9 63DEBUGINFO =
a0499e2f
VZ
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
efa7066d
VZ
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
a0499e2f
VZ
85!ifeq FINAL 1
86CONFIGURATION=Release
efa7066d 87LIBPAGESIZE=/p=1024
a0499e2f
VZ
88!else
89CONFIGURATION=Debug
efa7066d 90LIBPAGESIZE=/p=2048
2bda0e17 91!endif
2bda0e17 92
a0499e2f
VZ
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
2bda0e17 98
a0499e2f
VZ
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
2bda0e17 110LEVEL = 386
a0499e2f
VZ
111CXX = wpp$(LEVEL)
112CC = wcc$(LEVEL)
efa7066d 113LIB = wlib /q
a0499e2f
VZ
114RC = wrc
115WINVERFLAGS = /dWINVER=0x400
2bda0e17
KB
116BINDCOMMAND = wrc
117WATLIBDIR = $(WATCOMDIR)\lib386\nt
2bda0e17 118STACK = option stack=64k
a0499e2f
VZ
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)
2bda0e17
KB
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
a0499e2f
VZ
147# for PPro:
148# OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
9f51f2b6 149#
a0499e2f
VZ
150# optimize for space/time: /os or /ot
151!ifeq FINAL 1
152OPTFLAGS=/oails /5r
153!else
154OPTFLAGS=/od
155!endif
156
9f51f2b6
VZ
157# NB: /bm switch is needed for thread-safe runtime, if you don't use
158# wxThread you may remove it
a0499e2f
VZ
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)
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