]> git.saurik.com Git - wxWidgets.git/blame - src/makewat.env
Applied patch [ 666379 ] CalCtrl doesn't use best sizes for the year combobox
[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
2bda0e17 22FINAL=0
a0499e2f
VZ
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
27WATCOM_SUFFIX=_w
2bda0e17 28
7be1f0d9
JS
29.EXTENSIONS:
30.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
2bda0e17 31
a0499e2f
VZ
32!ifndef %WATCOM
33!error WATCOM environment variable must be set!
34!endif
35WATCOMDIR=$(%WATCOM)
36
37!ifndef %WXWIN
38!error WXWIN environment variable must be set!
39!endif
7be1f0d9 40WXDIR = $(%WXWIN)
2bda0e17
KB
41
42# Suffixes
43OBJSUFF=obj
44SRCSUFF=cpp
45
a0499e2f 46!ifeq FINAL 1
b2aef89b 47WXDEBUG=0
a0499e2f
VZ
48!else
49WXDEBUG=1
2bda0e17
KB
50!endif
51
7be1f0d9 52!ifeq WXDEBUG 1
a0499e2f
VZ
53DEBUGFLAGS = /D__WXDEBUG__
54DEBUGCFLAGS = $(DEBUGFLAGS) /d2
55DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
2bda0e17 56DEBUGINFO = debug all
a0499e2f 57DEBUGSUFFIX = d
7be1f0d9 58!else
a0499e2f
VZ
59DEBUGCFLAGS =
60DEBUGCXXFLAGS =
7be1f0d9 61DEBUGINFO =
a0499e2f
VZ
62DEBUGSUFFIX =
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
68TOOLKIT = base
69BASEDIRPREFIX = Base
70LINKOPTION = nt
71!else
72TOOLKIT = msw
73LINKOPTION = nt_win
74BASEDIRPREFIX =
75!endif
76
77ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
78
efa7066d
VZ
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
a0499e2f
VZ
83!ifeq FINAL 1
84CONFIGURATION=Release
efa7066d 85LIBPAGESIZE=/p=1024
a0499e2f
VZ
86!else
87CONFIGURATION=Debug
efa7066d 88LIBPAGESIZE=/p=2048
2bda0e17 89!endif
2bda0e17 90
a0499e2f
VZ
91# set OUTPUTDIR to the directory to be used for the .obj files created during
92# the build (under $WXWIN)
93!ifndef OUTPUTDIR
94OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom\
95!endif
2bda0e17 96
a0499e2f
VZ
97!ifneq NOPRECOMP 1
98PRECOMP = /fh=$(OUTPUTDIR)watcom.pch
99!endif
100
101# the basename of the library
102LIBNAME=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
2bda0e17 108LEVEL = 386
a0499e2f
VZ
109CXX = wpp$(LEVEL)
110CC = wcc$(LEVEL)
efa7066d 111LIB = wlib /q
a0499e2f
VZ
112RC = wrc
113WINVERFLAGS = /dWINVER=0x400
2bda0e17
KB
114BINDCOMMAND = wrc
115WATLIBDIR = $(WATCOMDIR)\lib386\nt
2bda0e17 116STACK = option stack=64k
a0499e2f
VZ
117LIBS = $(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
132IFLAGS = -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
136RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
2bda0e17
KB
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
a0499e2f
VZ
145# for PPro:
146# OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6
9f51f2b6 147#
a0499e2f
VZ
148# optimize for space/time: /os or /ot
149!ifeq FINAL 1
150OPTFLAGS=/oails /5r
151!else
152OPTFLAGS=/od
153!endif
154
9f51f2b6
VZ
155# NB: /bm switch is needed for thread-safe runtime, if you don't use
156# wxThread you may remove it
a0499e2f
VZ
157CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
158!ifeq wxUSE_GUI 0
159CPPFLAGS += /dwxUSE_GUI=0
160!endif
161
162CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS)
163CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS)
2bda0e17
KB
164
165.cpp.obj: # $< # .AUTODEPEND
a0499e2f 166 *$(CXX) $(CXXFLAGS) $<
2bda0e17 167
2bda0e17 168.c.obj: # $< # .AUTODEPEND
a0499e2f 169 *$(CC) $(CFLAGS) $<
2bda0e17 170
a0499e2f 171defaulttarget: all .SYMBOLIC
2bda0e17
KB
172
173erasepch: .SYMBOLIC
a0499e2f 174 -erase $(OUTPUTDIR)watcom.pch