]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
Use the same error message for wxMSW and wxMac.
[wxWidgets.git] / build / bakefiles / common.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
481290e2
VS
2<!-- $Id$ -->
3
ddf98968 4<makefile>
b6dc1b90 5
e06a4299 6 <requires version="0.1.7"/>
e2c10c59 7
ddf98968
VS
8 <!-- bakefile modules we need: -->
9 <using module="datafiles"/>
10
11 <!-- load python module with wxwindows helpers: -->
12 <using module="wxwin"/>
13
c8c1b0bf
DE
14 <!-- DFE: Add a platform meaning regular MacOS (not OS X) -->
15 <!-- FIXME: This will be handled in Bakefile but for now I wanted to
e2c10c59
WS
16 get my changes to the wx bakefiles in the tree but invisible to
17 windows toolkits and their config.xxx settings -->
18 <if cond="FORMAT=='autoconf'">
19 <option name="PLATFORM_MACOS"/>
20 </if>
21 <if cond="FORMAT!='autoconf'">
22 <set var="PLATFORM_MACOS">0</set>
23 </if>
c8c1b0bf 24
ddf98968 25 <include file="config.bkl"/>
c79241a2
VS
26
27 <include file="plugins_deps.bkl"/>
e2c10c59 28
ddf98968 29 <!-- ================================================================== -->
77ffb593 30 <!-- wxWidgets version numbers: -->
ddf98968
VS
31 <!-- ================================================================== -->
32
33 <set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
34 <set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
35 <set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
ceec2216
RL
36 <set var="WX_RELEASE" make_var="1">
37 $(WXVER_MAJOR).$(WXVER_MINOR)
38 </set>
a1bf307a
RL
39 <set var="WX_RELEASE_NODOT" make_var="1">
40 $(WXVER_MAJOR)$(WXVER_MINOR)
41 </set>
42 <set var="WX_VERSION" make_var="1">
43 $(WX_RELEASE).$(WXVER_RELEASE)
44 </set>
45 <set var="WX_VERSION_NODOT" make_var="1">
46 $(WX_RELEASE_NODOT)$(WXVER_RELEASE)
47 </set>
ddf98968 48
bdc408c4
VS
49 <set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
50
51 <set var="WXSOVERSION">
52 <if cond="WX_STABLE_BRANCH=='1'">0.0.0</if>
53 <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE).0.0</if>
54 </set>
ddf98968 55 <set var="WXMACVERSION">$(WX_VERSION)</set>
bdc408c4 56 <set var="WXWIN32DLLVERSION">
a1bf307a
RL
57 <if cond="WX_STABLE_BRANCH=='1'">$(WX_RELEASE_NODOT)</if>
58 <if cond="WX_STABLE_BRANCH=='0'">$(WX_VERSION_NODOT)</if>
bdc408c4 59 </set>
e2c10c59
WS
60
61
ddf98968
VS
62 <!-- ================================================================== -->
63 <!-- Names of libraries and DLLs: -->
64 <!-- ================================================================== -->
65
66 <set var="PORTNAME">
67 <if cond="USE_GUI=='0'">base</if>
68 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
69 </set>
e2c10c59 70
64a2a46f
VS
71 <set var="WXBASEPORT">
72 <if cond="TOOLKIT=='MAC'">_carbon</if>
73 </set>
ddf98968
VS
74
75 <set var="COMPILERORGCC">
76 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
77 <if cond="not isdefined('COMPILER')">gcc</if>
78 </set>
79 <set var="WXCOMPILER">
80 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
81 </set>
4fc5f509
VS
82
83 <set var="VENDORTAG">
cff5df9f
VS
84 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
85 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
4fc5f509
VS
86 </set>
87
ddf98968 88 <set var="WXDEBUGFLAG">
4f6e1dac
VS
89 <if cond="BUILD=='debug' and DEBUG_FLAG=='default'">d</if>
90 <if cond="DEBUG_FLAG=='1'">d</if>
ddf98968
VS
91 </set>
92 <set var="WXUNICODEFLAG">
af594eca
VS
93 <!-- WinCE is Unicode-only platform: -->
94 <if cond="UNICODE=='1' and FORMAT!='msevc4prj'">u</if>
ddf98968
VS
95 </set>
96 <set var="WXNAMESUFFIX">
ceec2216 97 $(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
ddf98968 98 </set>
e2c10c59 99
ddf98968
VS
100 <set var="WXUNIVNAME">
101 <if cond="WXUNIV=='1'">univ</if>
102 </set>
103 <set var="WXUNIV_DEFINE">
104 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
105 </set>
106
cdc0282e 107 <if cond="FORMAT=='autoconf'">
64a2a46f 108 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
cdc0282e 109 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
a1bf307a 110 <set var="WXVERSIONTAG">-$(WX_RELEASE)</set>
cdc0282e
VS
111 </if>
112 <if cond="FORMAT!='autoconf'">
64a2a46f 113 <set var="WXNAMEPREFIX">
a1bf307a 114 wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)
64a2a46f
VS
115 </set>
116 <set var="WXNAMEPREFIXGUI">
a1bf307a 117 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set>
cdc0282e
VS
118 <set var="WXVERSIONTAG"></set>
119 </if>
4fc5f509 120 <set var="WXDLLNAMEPREFIX">
64a2a46f 121 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 122 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
64a2a46f 123 </if>
4fc5f509
VS
124 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
125 </set>
126 <set var="WXDLLNAMEPREFIXGUI">
127 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 128 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
4fc5f509
VS
129 </if>
130 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
131 </set>
132 <set var="WXDLLVERSIONTAG">
133 <if cond="PLATFORM_WIN32=='1'"></if>
134 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
135 </set>
ddf98968 136
e2c10c59 137
ddf98968
VS
138 <!-- =============================================================== -->
139 <!-- Names of component libraries: -->
140 <!-- =============================================================== -->
141
e86e1522
VS
142 <set var="WXLIB_BASE">
143 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
144 </set>
7c4728f6
VS
145 <set var="WXLIB_NET">
146 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
147 </set>
ddf98968
VS
148 <set var="WXLIB_CORE">
149 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
150 </set>
13cb46e0
VS
151 <set var="WXLIB_ADV">
152 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
153 </set>
2ae3b602
RN
154 <set var="WXLIB_MEDIA">
155 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('media')))</if>
156 </set>
fab9850d 157 <set var="WXLIB_HTML">
e86e1522 158 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 159 </set>
a69544bf
VS
160 <set var="WXLIB_XML">
161 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
162 </set>
a62d8849
WS
163 <set var="WXLIB_XRC">
164 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
165 </set>
bb41dcbe 166 <set var="WXLIB_ODBC">
395a1c56
VS
167 <if cond="MONOLITHIC=='0' and USE_ODBC=='1'">
168 $(mk.evalExpr(wxwin.mkLibName('odbc')))
169 </if>
bb41dcbe 170 </set>
45293562
VS
171 <set var="WXLIB_DBGRID">
172 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))</if>
173 </set>
ddf98968
VS
174
175 <set var="WXLIB_MONO">
176 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
177 </set>
e2c10c59
WS
178
179
ddf98968 180 <!-- =============================================================== -->
cff5df9f 181 <!-- Where to store built libraries and objects: -->
ddf98968 182 <!-- =============================================================== -->
e2c10c59 183
af594eca
VS
184 <set var="DIR_SUFFIX_CPU">
185 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
186 </set>
cff5df9f
VS
187
188 <if cond="FORMAT!='autoconf'">
189 <set var="WXDLLFLAG">
190 <if cond="SHARED=='1'">dll</if>
191 </set>
192 <set var="CFG_NAME_PART">
193 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
194 </set>
328f5196 195 <set var="OBJS" make_var="1">
af594eca
VS
196 <if cond="FORMAT!='cbuilderx'">
197 $(COMPILER)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
198 </if>
328f5196
VS
199 <!-- FIXME: waiting for removal after CBX has better ../ dirs
200 support -->
201 <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
202 </set>
203
cff5df9f
VS
204 <set var="BUILDDIR">$(OBJS)</set>
205 </if>
e2c10c59 206
46da6d06
WS
207 <set var="LIBTYPE_SUFFIX" make_var="1">
208 <if cond="FORMAT!='autoconf' and SHARED=='0'">lib</if>
209 <if cond="FORMAT!='autoconf' and SHARED=='1'">dll</if>
210 </set>
211
390c0cfb 212 <set var="LIBDIRNAME" make_var="1">
481290e2 213 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
46da6d06
WS
214 <if cond="FORMAT!='autoconf'">
215 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
cff5df9f 216 </if>
ddf98968 217 </set>
e2c10c59 218
ee929bcf
VS
219 <if cond="FORMAT!='autoconf'">
220 <set var="SETUPHDIR" make_var="1">
221 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
222 </set>
223 </if>
cff5df9f 224
e2c10c59
WS
225
226
4843dc4c
VS
227 <!-- =============================================================== -->
228 <!-- Templates for libs: -->
229 <!-- =============================================================== -->
cdc0282e 230
4f6e1dac
VS
231 <set var="DEBUGINFO">
232 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
233 <if cond="DEBUG_INFO=='1'">on</if>
234 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
235 <if cond="DEBUG_INFO=='0'">off</if>
236 </set>
237 <set var="DEBUGRUNTIME">
238 <if cond="DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)</if>
239 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
240 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
cdc0282e
VS
241 </set>
242 <set var="OPTIMIZEFLAG">
546a7e42
VS
243 <if cond="BUILD=='debug'">off</if>
244 <if cond="BUILD=='release'">speed</if>
cdc0282e 245 </set>
9833a21a
VS
246 <set var="EXCEPTIONSFLAG">
247 <if cond="USE_EXCEPTIONS=='1'">on</if>
248 <if cond="USE_EXCEPTIONS=='0'">off</if>
249 </set>
c2efd890
VZ
250 <set var="RTTIFLAG">
251 <if cond="USE_RTTI=='1'">on</if>
252 <if cond="USE_RTTI=='0'">off</if>
253 </set>
d1e5aa07
VS
254 <set var="THREADSFLAG">
255 <if cond="USE_THREADS=='1'">multi</if>
256 <if cond="USE_THREADS=='0'">single</if>
257 </set>
15b44c69
VS
258
259 <set var="DEBUG_DEFINE">
4f6e1dac
VS
260 <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
261 <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
15b44c69 262 </set>
4435bd42
MB
263 <!-- does not cover all cases, but better than nothing -->
264 <set var="NO_VC_CRTDBG">
265 <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
266 <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
267 </set>
15b44c69 268 <set var="UNICODE_DEFINE">
ed4ccecd 269 <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
15b44c69 270 </set>
e2c10c59 271
5fae0f97
WS
272 <!-- fill for the specific case of the format/compiler -->
273 <set var="WIN32_WINNT">
274 <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
275 </set>
276
416f5bc8
VS
277 <set var="UNICOWS_LIB">
278 <if cond="MSLU=='1'">unicows</if>
279 </set>
5e3746dc 280
149cc218 281 <template id="common_settings">
4f6e1dac
VS
282 <debug-info>$(DEBUGINFO)</debug-info>
283 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
5e3746dc 284 <optimize>$(OPTIMIZEFLAG)</optimize>
d1e5aa07 285 <threading>$(THREADSFLAG)</threading>
4b44ea2b 286 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
c2efd890 287 <cxx-rtti>$(RTTIFLAG)</cxx-rtti>
9833a21a 288 <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
5e3746dc
VS
289 <if cond="FORMAT!='autoconf'">
290 <cppflags>$(EXTRACFLAGS)</cppflags>
291 </if>
4435bd42 292 <define>$(NO_VC_CRTDBG)</define>
5fae0f97 293 <define>$(WIN32_WINNT)</define>
5e3746dc 294 </template>
e2c10c59 295
4843dc4c 296 <template id="anylib">
4843dc4c
VS
297 <dirname>$(LIBDIRNAME)</dirname>
298 <install-to>$(LIBDIR)</install-to>
299 </template>
300
149cc218 301 <template id="3rdparty_lib" template="common_settings,anylib">
a1bf307a
RL
302 <if cond="FORMAT=='autoconf'">
303 <libname>$(id)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
304 </if>
305 <if cond="FORMAT!='autoconf'">
9c2d002b 306 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
a1bf307a 307 </if>
52a5a009
VS
308 <!--
309 we want to install 3rd party libs system-wide only with static
77ffb593 310 version of wxWidgets; otherwise they are embedded in shared libs:
52a5a009
VS
311 -->
312 <install-if>SHARED=='0'</install-if>
af594eca 313 <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
82cb0280 314 </template>
e2c10c59
WS
315
316
cb9548d9 317 <!-- deal with the need to copy setup.h here: -->
82cb0280 318
af594eca
VS
319 <set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
320
cb9548d9 321 <define-tag name="msvc-headers" rules="dll,lib">
af594eca 322 <if cond="IS_MSVC_PRJ">
cb9548d9
VS
323 <msvc-project-files>
324 $(addPrefixToList('include\', wxwin.headersOnly(value)))
325 </msvc-project-files>
326 </if>
327 </define-tag>
328
329 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
af594eca
VS
330 <if cond="FORMAT=='msevc4prj'">
331 <msvc-headers>wx/msw/wince/setup.h</msvc-headers>
332 <set var="vc_setup_h">wince\setup.h</set>
333 <set var="vc_setup_h_rule">wince_setup_h</set>
334 </if>
335 <if cond="FORMAT!='msevc4prj'">
cb9548d9 336 <msvc-headers>wx/msw/setup.h</msvc-headers>
af594eca
VS
337 <set var="vc_setup_h">setup.h</set>
338 <set var="vc_setup_h_rule">setup_h</set>
339 </if>
340 <if cond="IS_MSVC_PRJ">
341 <set var="_custom_build_files" append="1">
342 include\wx\msw\$(vc_setup_h)
cb9548d9 343 </set>
af594eca 344 <set var="_custom_build_include_wx_msw_$(vc_setup_h_rule)">
cb9548d9 345Creating $(SETUPHDIR)\wx\setup.h
af594eca 346InputPath=..\include\wx\msw\$(vc_setup_h)
cb9548d9
VS
347
348"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
349$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
350 </set>
351 </if>
352 </define-tag>
353
354 <template id="msvc_setup_h">
355 <msvc-copy-setup-h/>
356 </template>
ddf98968
VS
357
358 <!-- =============================================================== -->
359 <!-- 3rd party libs: -->
360 <!-- =============================================================== -->
e2c10c59 361
ddf98968
VS
362 <!-- 3rd party libraries: -->
363 <include file="regex.bkl"/>
364 <include file="zlib.bkl"/>
365 <include file="png.bkl"/>
366 <include file="jpeg.bkl"/>
367 <include file="tiff.bkl"/>
368 <include file="odbc.bkl"/>
a69544bf 369 <include file="expat.bkl"/>
ddf98968 370
e2c10c59 371
ddf98968 372 <!-- =============================================================== -->
77ffb593 373 <!-- Templates for wxWidgets libs: -->
ddf98968 374 <!-- =============================================================== -->
cdc0282e 375
2cc75628
VS
376 <!-- NB: in monolithic build, even wxBase-only must be linked against
377 GUI extralibs, otherwise there would be unresolved references.
378 The variables below are defined so that all libs are used
379 in monolithic build, but not in multilib one. -->
380 <set var="EXTRALIBS_FOR_BASE">
381 <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_GUI)</if>
382 <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
383 </set>
384 <set var="EXTRALIBS_FOR_GUI">
385 <if cond="MONOLITHIC=='1'"></if>
386 <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
387 </set>
388
149cc218 389 <template id="wx" template="common_settings">
ddf98968
VS
390 <set var="wxid">$(wxwin.mk_wxid(id))</set>
391 <define>__WX$(TOOLKIT)__</define>
392 <define>$(WXUNIV_DEFINE)</define>
15b44c69
VS
393 <define>$(DEBUG_DEFINE)</define>
394 <define>$(UNICODE_DEFINE)</define>
85ebb95c
VS
395 <!-- this include is added by configure, we need to put other
396 includes before it: -->
397 <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
e2c10c59 398 <lib-path>$(LIBDIRNAME)</lib-path>
ee929bcf 399 <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
432afc17 400 <warnings>max</warnings>
a0177486
WS
401 <cppflags-watcom>
402 -wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
403 -wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
404 -wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
405 -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
406 </cppflags-watcom>
329a2be8 407 <cxxflags-mingw>
f8fbc92b 408 -Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends -->
329a2be8 409 </cxxflags-mingw>
ddf98968
VS
410 </template>
411
c74dc163 412 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 413 <template id="wx_append_base_nomono">
ddf98968 414 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 415 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
416 <sys-lib>$(LIB_JPEG)</sys-lib>
417 <sys-lib>$(LIB_PNG)</sys-lib>
418 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
419 <sys-lib>$(LIB_ODBC)</sys-lib>
420 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 421 <sys-lib>$(LIB_EXPAT)</sys-lib>
e2c10c59 422
2cc75628 423 <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
15b44c69
VS
424
425 <!-- system libraries on windows: -->
426 <if cond="FORMAT!='autoconf'">
416f5bc8 427 <sys-lib>$(UNICOWS_LIB)</sys-lib>
328f5196 428 <if cond="FORMAT=='borland'">
cb8bbc13
VS
429 <sys-lib>ole2w32</sys-lib>
430 </if>
f9c4805a
VS
431 <if cond="FORMAT=='msevc4prj'">
432 <sys-lib>ole32</sys-lib>
433 <sys-lib>oleaut32</sys-lib>
434 <sys-lib>uuid</sys-lib>
435 <sys-lib>commctrl</sys-lib>
f9c4805a
VS
436 <sys-lib>winsock</sys-lib>
437 <sys-lib>wininet</sys-lib>
438 </if>
439 <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'">
cb8bbc13
VS
440 <sys-lib>kernel32</sys-lib>
441 <sys-lib>user32</sys-lib>
442 <sys-lib>gdi32</sys-lib>
443 <sys-lib>comdlg32</sys-lib>
444 <sys-lib>winspool</sys-lib>
445 <sys-lib>winmm</sys-lib>
446 <sys-lib>shell32</sys-lib>
cb8bbc13 447 <sys-lib>comctl32</sys-lib>
cb8bbc13
VS
448 <sys-lib>ole32</sys-lib>
449 <sys-lib>oleaut32</sys-lib>
450 <sys-lib>uuid</sys-lib>
451 <sys-lib>rpcrt4</sys-lib>
452 <sys-lib>advapi32</sys-lib>
453 <sys-lib>wsock32</sys-lib>
15b44c69 454 </if>
57670219 455 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
3682ea7d
VS
456 <sys-lib>oleacc</sys-lib>
457 </if>
f9c4805a
VS
458 <if cond="FORMAT!='msevc4prj'">
459 <sys-lib>odbc32</sys-lib>
460 </if>
57670219 461 </if>
ddf98968
VS
462 </template>
463
82ca3afe 464
c74dc163 465 <!-- for GUI libs/samples: -->
e83a52a2 466 <template id="wx_append_nomono" template="wx_append_base_nomono">
2cc75628 467 <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
c74dc163
VS
468 </template>
469
e83a52a2
VS
470
471 <template id="wx_append_base" template_append="wx_append_base_nomono">
472 <!-- Always link against the wxWin library in monolithic build: -->
473 <sys-lib>$(WXLIB_MONO)</sys-lib>
474 </template>
475 <template id="wx_append" template_append="wx_append_nomono">
476 <!-- Always link against the wxWin library in monolithic build: -->
477 <sys-lib>$(WXLIB_MONO)</sys-lib>
478 </template>
e2c10c59 479
e83a52a2 480
0469579d 481 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
e2c10c59 482
4843dc4c 483 <template id="wx_lib_b" template="wx,anylib">
ddf98968 484 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 485 <libname>$(WXLIBNAME)</libname>
cb8bbc13 486
0469579d 487 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
a92d711e 488 <if cond="FORMAT!='autoconf' and TOOLKIT=='MSW'">
0469579d
VS
489 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
490 <precomp-headers-gen>
491 $(WXTOPDIR)src/msw/dummy.cpp
492 </precomp-headers-gen>
493 </if>
a420c7ed 494 <precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location>
0469579d
VS
495 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
496 <precomp-headers>on</precomp-headers>
497 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
3fe70739 498 <precomp-headers-exclude>
3fe70739 499 src/common/extended.c
ebee3cd0
VS
500 src/msw/gsocket.cpp
501 src/msw/gsockmsw.cpp
3fe70739 502 </precomp-headers-exclude>
cb8bbc13 503 </if>
e2c10c59 504
3a811096 505 <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
82ca3afe
VS
506 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
507 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
508 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
509 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
510 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
511 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
82ca3afe
VS
512 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
513 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
514 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
515 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
cbba971f 516 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
82ca3afe 517 </if>
ddf98968 518 </template>
cb8bbc13 519
fab9850d 520 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
521 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
522 <dllname>$(WXDLLNAME)</dllname>
523 <version>$(WX_VERSION)</version>
524 <so_version>$(WXSOVERSION)</so_version>
525 <mac_version>$(WXMACVERSION)</mac_version>
d181c36e
VS
526
527 <!-- version info resources: -->
528 <res-define>WXDLLNAME=$(WXDLLNAME)</res-define>
529 <win32-res>src/msw/version.rc</win32-res>
ddf98968 530 </template>
c0608865 531
0bcf9597 532 <template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
3fe70739
VS
533 <depends>wxtiff</depends>
534 <depends>wxjpeg</depends>
535 <depends>wxpng</depends>
0bcf9597
WS
536 </template>
537
538 <template id="wx_3rdparty_dependencies"
539 template="wx_3rdparty_dependencies_gui">
390c0cfb 540 <depends>wxexpat</depends>
c74dc163 541 <depends>wxzlib</depends>
3fe70739 542 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
c74dc163
VS
543 <depends>wxregex</depends>
544 </template>
ee929bcf 545
0bcf9597 546 <template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'">
ee929bcf
VS
547 <include>$(INC_TIFF)</include>
548 <include>$(INC_JPEG)</include>
549 <include>$(INC_PNG)</include>
0bcf9597
WS
550 </template>
551
552 <template id="wx_3rdparty_includes"
553 template="wx_3rdparty_includes_gui">
ee929bcf
VS
554 <include>$(INC_ZLIB)</include>
555 <include>$(INC_ODBC)</include>
556 <include>$(INC_REGEX)</include>
557 <include>$(INC_EXPAT)</include>
558 </template>
e2c10c59 559
9698d244
VS
560 <template id="wx_lib"
561 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
562 <template id="wx_base_lib"
563 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
e2c10c59 564 <define>wxUSE_GUI=0</define>
15d93f1e
VS
565 </template>
566
ee929bcf
VS
567 <template id="wx_dll"
568 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 569 template_append="msvc_setup_h,wx_append_nomono"/>
ee929bcf
VS
570 <template id="wx_base_dll"
571 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 572 template_append="msvc_setup_h,wx_append_base_nomono">
e2c10c59 573 <define>wxUSE_GUI=0</define>
15d93f1e 574 </template>
e2c10c59 575
ae4ae157 576 <!-- =============================================================== -->
77ffb593 577 <!-- Templates for building wxWidgets plugins: -->
ae4ae157
VS
578 <!-- =============================================================== -->
579
ae4ae157 580 <if cond="WX_STABLE_BRANCH=='1'">
c79241a2 581 <set var="PLUGIN_VERSION0">
a1bf307a
RL
582 <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
583 <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
ae4ae157
VS
584 </set>
585 </if>
586 <if cond="WX_STABLE_BRANCH=='0'">
c79241a2 587 <set var="PLUGIN_VERSION0">
a1bf307a
RL
588 <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
589 <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
ae4ae157
VS
590 </set>
591 </if>
c79241a2
VS
592 <set var="PLUGVERDELIM">
593 <if cond="PLATFORM_UNIX=='1'">-</if>
594 <if cond="PLATFORM_UNIX=='0'"></if>
595 </set>
596 <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
e2c10c59 597
c79241a2
VS
598 <set var="PLUGINSUFFIX">
599 <if cond="UNICODE=='0' and BUILD=='release'"></if>
314a6446
VS
600 <if cond="UNICODE=='0' and BUILD=='debug'">d</if>
601 <if cond="UNICODE=='1' and BUILD=='release'">u</if>
602 <if cond="UNICODE=='1' and BUILD=='debug'">ud</if>
c79241a2
VS
603 </set>
604
605 <set var="PLUGINS_INST_DIR" make_var="1">
606 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
607 </set>
ae4ae157
VS
608
609 <define-rule name="wx-base-plugin" extends="module">
610 <template>
611 <dllname>
c79241a2 612 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
613 </dllname>
614 <define>WXUSINGDLL</define>
15d93f1e 615 <define>wxUSE_GUI=0</define>
c79241a2 616 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
617 </template>
618 </define-rule>
e2c10c59 619
ae4ae157
VS
620 <define-rule name="wx-gui-plugin" extends="module">
621 <template template="wx">
622 <dllname>
c79241a2 623 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
624 </dllname>
625 <define>WXUSINGDLL</define>
c79241a2 626 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
627 </template>
628 </define-rule>
e2c10c59 629
ddf98968 630 <!-- =============================================================== -->
77ffb593 631 <!-- Support for wxWidgets samples and contrib: -->
ddf98968
VS
632 <!-- =============================================================== -->
633
634 <!-- Link against one wxWin library. Value must be literal! -->
485a205e 635 <define-tag name="wx-lib" rules="exe,dll,module">
ddf98968 636 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
22cef566 637 <ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
3a811096 638 <if cond="IS_MSVC_PRJ=='1' and MONOLITHIC=='0'">
dce0742b 639 <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
7bd54b68 640 </if>
ddf98968
VS
641 </define-tag>
642
4bae0a94
VS
643
644 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
645 {top_srcdir} from configure, poor bakefile can't know that
646 and won't output top_srcdir = @top_srcdir@ line): -->
647 <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
648
649
ddf98968 650</makefile>