-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakewat.env
196 lines (164 loc) · 5.57 KB
/
makewat.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
###############################################################################
# File: src/makewat.env
# Purpose: Watcom environments for wxWindows makefiles.
# Author: Julian Smart and others
# Version: $Id: makewat.env,v 1.2 2007/11/01 17:50:40 lollisoft Exp $
# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
###############################################################################
# The following environment variables must be set:
#
# WATCOM: set to where the compiler is installed
# WXWIN: set to where the wxWindows is installed
# PATH: set correctly, i.e. contains all Watcom directories
# LIB: same as PATH
# INCLUDE: same as PATH
# set wxUSE_GUI=0 to build wxBase instead of (default) wxMSW
!ifndef wxUSE_GUI
wxUSE_GUI=1
!endif
# CF: Recursive calls to wmake will get $(__MAKEOPTS__) passed.
__MAKEOPTS__ += wxUSE_GUI=$(wxUSE_GUI)
# set FINAL=1 to disable debug and enable optimizations
!ifndef FINAL
FINAL=0
!endif
# CF: Recursive calls to wmake will get $(__MAKEOPTS__) passed.
__MAKEOPTS__ += FINAL=$(FINAL)
# set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to
# something Watcom-specific if you want to build wxWindows with more than one
# compiler
WATCOM_SUFFIX=_w
# change/remove this if you want to create programs for older Windows versions,
# increase the version to be able to use more Win2K+-only features
WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300
# optimize for space/time: /os or /ot
# CF: I'm entirely replacing the old flags with new, identical ones,
# favouring time optimizations (faster code) over space (smaller code) now.
# Note that this is *not* the reason for the resulting very large wx libs files.
!ifeq FINAL 1
OPTFLAGS= -5r -zp8 -otexan
!else
OPTFLAGS= -5r -od -d2
!endif
!ifndef MAKEDLL
MAKEDLL=1
!endif
!ifeq MAKEDLL 1
MAKEDLL_FLAGS= /D_WINDLL /DWXMAKINGDLL
!else
MAKEDLL_FLAGS=
!endif
###############################################################################
# You shouldn't have to modify anything after this point
###############################################################################
.EXTENSIONS:
.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
!ifndef %WATCOM
!error WATCOM environment variable must be set!
!endif
WATCOMDIR=$(%WATCOM)
!ifndef %WXWIN
!error WXWIN environment variable must be set!
!endif
WXDIR = $(%WXWIN)
# Suffixes
OBJSUFF=obj
SRCSUFF=cpp
!ifeq FINAL 1
WXDEBUG=0
!else
WXDEBUG=1
!endif
!ifeq WXDEBUG 1
DEBUGFLAGS = /D__WXDEBUG__
DEBUGCFLAGS = $(DEBUGFLAGS) /d2
DEBUGCXXFLAGS = $(DEBUGFLAGS) /d2i
DEBUGINFO = debug all
DEBUGSUFFIX = d
!else
DEBUGCFLAGS =
DEBUGCXXFLAGS =
DEBUGINFO =
DEBUGSUFFIX =
!endif
# TOOLKIT is used as the name of lib subdir containing wx/setup.h
# BASEDIRPREFIX is used to construct OUTPUTDIR
!ifeq wxUSE_GUI 0
TOOLKIT = base
BASEDIRPREFIX = Base
LINKSYSTEM = nt
!else
TOOLKIT = msw
LINKSYSTEM = nt_win
BASEDIRPREFIX =
!endif
ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX)
# set the things which depend on debug/release
#
# note that the values for LIBPAGESIZE are minimal possible, the library
# doesn't link (Error! Library too large) with values smaller than given
!ifeq FINAL 1
CONFIGURATION=Release
LIBPAGESIZE=/p=1024
!else
CONFIGURATION=Debug
LIBPAGESIZE=/p=2048
!endif
# set OUTPUTDIR to the directory to be used for the .obj files created during
# the build (under $WXWIN)
!ifndef OUTPUTDIR
OUTPUTDIR=$(WXDIR)\$(BASEDIRPREFIX)$(CONFIGURATION)Watcom
# no trailing slash for win98
!endif
!ifneq NOPRECOMP 1
PRECOMP = /fh=$(OUTPUTDIR)\watcom.pch
!endif
# the basename of the library
LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX)
# only LEVEL=386 is currently supported, 16 bit compilation is probably broken
LEVEL = 386
CXX = wpp$(LEVEL)
CC = wcc$(LEVEL)
LIB = wlib /q
RC = wrc
BINDCOMMAND = wrc
WATLIBDIR = $(WATCOMDIR)\lib386\nt
STACK = option stack=64k
LIBS = $(WXDIR)\lib\$(LIBNAME).lib &
$(WXDIR)\lib\regex$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\zlib$(WATCOM_SUFFIX).lib &
!ifneq wxUSE_GUI 0
$(WXDIR)\lib\png$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\tiff$(WATCOM_SUFFIX).lib &
$(WXDIR)\lib\jpeg$(WATCOM_SUFFIX).lib &
!endif
$(WATLIBDIR)\comctl32.lib &
$(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\odbc32.lib &
$(WATLIBDIR)\ole32.lib &
$(WATLIBDIR)\oleaut32.lib &
$(WATLIBDIR)\opengl32.lib &
$(WATLIBDIR)\uuid.lib
IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include &
-i=$(%watcom)\h;$(%watcom)\h\nt &
-i=$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff &
-i=$(WXDIR)\include\wx\msw\gnuwin32
RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS)
# NB: /bm switch is needed for thread-safe runtime, if you don't use
# wxThread you may remove it
CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR)\ /fr -zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS)
!ifeq wxUSE_GUI 0
CPPFLAGS += /dwxUSE_GUI=0
!endif
# zm and zv as well as the linker options below are used to make the resulting
# .exe smaller
CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) /zm $(MAKEDLL_FLAGS)
CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /zm /zv /w=8 $(EXTRACXXFLAGS) $(MAKEDLL_FLAGS)
LDFLAGS = option eliminate, vfremoval
.cpp.obj: # $< # .AUTODEPEND
*$(CXX) $(CXXFLAGS) $<
.c.obj: # $< # .AUTODEPEND
*$(CC) $(CFLAGS) $<
defaulttarget: all .SYMBOLIC
erasepch: .SYMBOLIC
-erase $(OUTPUTDIR)\watcom.pch