]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/makewat.env
Applied patch [ 743471 ] wxSplitter::Unsplit fix
[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# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
7###############################################################################
8
9# The following environment variables must be set:
10#
11# WATCOM: set to where the compiler is installed
12# WXWIN: set to where the wxWindows is installed
13# PATH: set correctly, i.e. contains all Watcom directories
14# LIB: same as PATH
15# INCLUDE: same as PATH
16
17# set wxUSE_GUI=0 to build wxBase instead of (default) wxMSW
18!ifndef wxUSE_GUI
19wxUSE_GUI=1
20!endif
21
22# set FINAL=1 to disable debug and enable optimizations
23!ifndef FINAL
24FINAL=0
25!endif
26
27# set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to
28# something Watcom-specific if you want to build wxWindows with more than one
29# compiler
30WATCOM_SUFFIX=_w
31
32# change/remove this if you want to create programs for older Windows versions,
33# increase the version to be able to use more Win2K+-only features
34WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300
35
36# optimize for space/time: /os or /ot
37!ifeq FINAL 1
38OPTFLAGS=/oails /5r
39!else
40OPTFLAGS=/od
41!endif
42
43
44###############################################################################
45# You shouldn't have to modify anything after this point
46###############################################################################
47
48.EXTENSIONS:
49.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
50
51!ifndef %WATCOM
52!error WATCOM environment variable must be set!
53!endif
54WATCOMDIR=$(%WATCOM)
55
56!ifndef %WXWIN
57!error WXWIN environment variable must be set!
58!endif
59WXDIR = $(%WXWIN)
60
61# Suffixes
62OBJSUFF=obj
63SRCSUFF=cpp
64
65!ifeq FINAL 1
66WXDEBUG=0
67!else
68WXDEBUG=1
69!endif
70
71!ifeq WXDEBUG 1
72DEBUGFLAGS = /D__WXDEBUG__
73DEBUGCFLAGS = $(DEBUGFLAGS) /d2
74DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
75DEBUGINFO = debug all
76DEBUGSUFFIX = d
77!else
78DEBUGCFLAGS =
79DEBUGCXXFLAGS =
80DEBUGINFO =
81DEBUGSUFFIX =
82!endif
83
84# TOOLKIT is used as the name of lib subdir containing wx/setup.h
85# BASEDIRPREFIX is used to construct OUTPUTDIR
86!ifeq wxUSE_GUI 0
87TOOLKIT = base
88BASEDIRPREFIX = Base
89LINKSYSTEM = nt
90!else
91TOOLKIT = msw
92LINKSYSTEM = nt_win
93BASEDIRPREFIX =
94!endif
95
96ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
97
98# set the things which depend on debug/release
99#
100# note that the values for LIBPAGESIZE are minimal possible, the library
101# doesn't link (Error! Library too large) with values smaller than given
102!ifeq FINAL 1
103CONFIGURATION=Release
104LIBPAGESIZE=/p=1024
105!else
106CONFIGURATION=Debug
107LIBPAGESIZE=/p=2048
108!endif
109
110# set OUTPUTDIR to the directory to be used for the .obj files created during
111# the build (under $WXWIN)
112!ifndef OUTPUTDIR
113OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom
114# no trailing slash for win98
115!endif
116
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
124# only LEVEL=386 is currently supported, 16 bit compilation is probably broken
125LEVEL = 386
126CXX = wpp$(LEVEL)
127CC = wcc$(LEVEL)
128LIB = wlib /q
129RC = wrc
130BINDCOMMAND = wrc
131WATLIBDIR = $(WATCOMDIR)\lib386\nt
132STACK = option stack=64k
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)
153
154# NB: /bm switch is needed for thread-safe runtime, if you don't use
155# wxThread you may remove it
156CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR)\ /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
157!ifeq wxUSE_GUI 0
158CPPFLAGS += /dwxUSE_GUI=0
159!endif
160
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
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
177