]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
Clarified the wording for the return value of count
[wxWidgets.git] / build / bakefiles / common.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
481290e2
VS
2<!-- $Id$ -->
3
ddf98968 4<makefile>
b6dc1b90 5
a63d2334 6 <requires version="0.1.4"/>
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>
fab9850d 154 <set var="WXLIB_HTML">
e86e1522 155 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 156 </set>
a69544bf
VS
157 <set var="WXLIB_XML">
158 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
159 </set>
a62d8849
WS
160 <set var="WXLIB_XRC">
161 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
162 </set>
bb41dcbe 163 <set var="WXLIB_ODBC">
395a1c56
VS
164 <if cond="MONOLITHIC=='0' and USE_ODBC=='1'">
165 $(mk.evalExpr(wxwin.mkLibName('odbc')))
166 </if>
bb41dcbe 167 </set>
45293562
VS
168 <set var="WXLIB_DBGRID">
169 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))</if>
170 </set>
ddf98968
VS
171
172 <set var="WXLIB_MONO">
173 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
174 </set>
e2c10c59
WS
175
176
ddf98968 177 <!-- =============================================================== -->
cff5df9f 178 <!-- Where to store built libraries and objects: -->
ddf98968 179 <!-- =============================================================== -->
e2c10c59 180
af594eca
VS
181 <set var="DIR_SUFFIX_CPU">
182 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
183 </set>
cff5df9f
VS
184
185 <if cond="FORMAT!='autoconf'">
186 <set var="WXDLLFLAG">
187 <if cond="SHARED=='1'">dll</if>
188 </set>
189 <set var="CFG_NAME_PART">
190 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
191 </set>
328f5196 192 <set var="OBJS" make_var="1">
af594eca
VS
193 <if cond="FORMAT!='cbuilderx'">
194 $(COMPILER)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
195 </if>
328f5196
VS
196 <!-- FIXME: waiting for removal after CBX has better ../ dirs
197 support -->
198 <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
199 </set>
200
cff5df9f
VS
201 <set var="BUILDDIR">$(OBJS)</set>
202 </if>
e2c10c59 203
390c0cfb 204 <set var="LIBDIRNAME" make_var="1">
481290e2 205 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
ee929bcf 206 <if cond="FORMAT!='autoconf' and SHARED=='0'">
af594eca 207 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_lib$(CFG)
ee929bcf
VS
208 </if>
209 <if cond="FORMAT!='autoconf' and SHARED=='1'">
af594eca 210 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_dll$(CFG)
cff5df9f 211 </if>
ddf98968 212 </set>
e2c10c59 213
ee929bcf
VS
214 <if cond="FORMAT!='autoconf'">
215 <set var="SETUPHDIR" make_var="1">
216 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
217 </set>
218 </if>
cff5df9f 219
e2c10c59
WS
220
221
4843dc4c
VS
222 <!-- =============================================================== -->
223 <!-- Templates for libs: -->
224 <!-- =============================================================== -->
cdc0282e 225
4f6e1dac
VS
226 <set var="DEBUGINFO">
227 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
228 <if cond="DEBUG_INFO=='1'">on</if>
229 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
230 <if cond="DEBUG_INFO=='0'">off</if>
231 </set>
232 <set var="DEBUGRUNTIME">
233 <if cond="DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)</if>
234 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
235 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
cdc0282e
VS
236 </set>
237 <set var="OPTIMIZEFLAG">
546a7e42
VS
238 <if cond="BUILD=='debug'">off</if>
239 <if cond="BUILD=='release'">speed</if>
cdc0282e 240 </set>
9833a21a
VS
241 <set var="EXCEPTIONSFLAG">
242 <if cond="USE_EXCEPTIONS=='1'">on</if>
243 <if cond="USE_EXCEPTIONS=='0'">off</if>
244 </set>
15b44c69
VS
245
246 <set var="DEBUG_DEFINE">
4f6e1dac
VS
247 <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
248 <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
15b44c69 249 </set>
4435bd42
MB
250 <!-- does not cover all cases, but better than nothing -->
251 <set var="NO_VC_CRTDBG">
252 <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
253 <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
254 </set>
15b44c69 255 <set var="UNICODE_DEFINE">
ed4ccecd 256 <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
15b44c69 257 </set>
e2c10c59 258
416f5bc8
VS
259 <set var="UNICOWS_LIB">
260 <if cond="MSLU=='1'">unicows</if>
261 </set>
5e3746dc 262
149cc218 263 <template id="common_settings">
4f6e1dac
VS
264 <debug-info>$(DEBUGINFO)</debug-info>
265 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
5e3746dc
VS
266 <optimize>$(OPTIMIZEFLAG)</optimize>
267 <threading>multi</threading>
4b44ea2b 268 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
9833a21a
VS
269 <cxx-rtti>$(EXCEPTIONSFLAG)</cxx-rtti>
270 <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
5e3746dc
VS
271 <if cond="FORMAT!='autoconf'">
272 <cppflags>$(EXTRACFLAGS)</cppflags>
273 </if>
4435bd42 274 <define>$(NO_VC_CRTDBG)</define>
5e3746dc 275 </template>
e2c10c59 276
4843dc4c 277 <template id="anylib">
4843dc4c
VS
278 <dirname>$(LIBDIRNAME)</dirname>
279 <install-to>$(LIBDIR)</install-to>
280 </template>
281
149cc218 282 <template id="3rdparty_lib" template="common_settings,anylib">
a1bf307a
RL
283 <if cond="FORMAT=='autoconf'">
284 <libname>$(id)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
285 </if>
286 <if cond="FORMAT!='autoconf'">
9c2d002b 287 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
a1bf307a 288 </if>
52a5a009
VS
289 <!--
290 we want to install 3rd party libs system-wide only with static
77ffb593 291 version of wxWidgets; otherwise they are embedded in shared libs:
52a5a009
VS
292 -->
293 <install-if>SHARED=='0'</install-if>
af594eca 294 <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
82cb0280 295 </template>
e2c10c59
WS
296
297
cb9548d9 298 <!-- deal with the need to copy setup.h here: -->
82cb0280 299
af594eca
VS
300 <set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
301
cb9548d9 302 <define-tag name="msvc-headers" rules="dll,lib">
af594eca 303 <if cond="IS_MSVC_PRJ">
cb9548d9
VS
304 <msvc-project-files>
305 $(addPrefixToList('include\', wxwin.headersOnly(value)))
306 </msvc-project-files>
307 </if>
308 </define-tag>
309
310 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
af594eca
VS
311 <if cond="FORMAT=='msevc4prj'">
312 <msvc-headers>wx/msw/wince/setup.h</msvc-headers>
313 <set var="vc_setup_h">wince\setup.h</set>
314 <set var="vc_setup_h_rule">wince_setup_h</set>
315 </if>
316 <if cond="FORMAT!='msevc4prj'">
cb9548d9 317 <msvc-headers>wx/msw/setup.h</msvc-headers>
af594eca
VS
318 <set var="vc_setup_h">setup.h</set>
319 <set var="vc_setup_h_rule">setup_h</set>
320 </if>
321 <if cond="IS_MSVC_PRJ">
322 <set var="_custom_build_files" append="1">
323 include\wx\msw\$(vc_setup_h)
cb9548d9 324 </set>
af594eca 325 <set var="_custom_build_include_wx_msw_$(vc_setup_h_rule)">
cb9548d9 326Creating $(SETUPHDIR)\wx\setup.h
af594eca 327InputPath=..\include\wx\msw\$(vc_setup_h)
cb9548d9
VS
328
329"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
330$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
331 </set>
332 </if>
333 </define-tag>
334
335 <template id="msvc_setup_h">
336 <msvc-copy-setup-h/>
337 </template>
ddf98968
VS
338
339 <!-- =============================================================== -->
340 <!-- 3rd party libs: -->
341 <!-- =============================================================== -->
e2c10c59 342
ddf98968
VS
343 <!-- 3rd party libraries: -->
344 <include file="regex.bkl"/>
345 <include file="zlib.bkl"/>
346 <include file="png.bkl"/>
347 <include file="jpeg.bkl"/>
348 <include file="tiff.bkl"/>
349 <include file="odbc.bkl"/>
a69544bf 350 <include file="expat.bkl"/>
ddf98968 351
e2c10c59 352
ddf98968 353 <!-- =============================================================== -->
77ffb593 354 <!-- Templates for wxWidgets libs: -->
ddf98968 355 <!-- =============================================================== -->
cdc0282e 356
2cc75628
VS
357 <!-- NB: in monolithic build, even wxBase-only must be linked against
358 GUI extralibs, otherwise there would be unresolved references.
359 The variables below are defined so that all libs are used
360 in monolithic build, but not in multilib one. -->
361 <set var="EXTRALIBS_FOR_BASE">
362 <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_GUI)</if>
363 <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
364 </set>
365 <set var="EXTRALIBS_FOR_GUI">
366 <if cond="MONOLITHIC=='1'"></if>
367 <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
368 </set>
369
149cc218 370 <template id="wx" template="common_settings">
ddf98968
VS
371 <set var="wxid">$(wxwin.mk_wxid(id))</set>
372 <define>__WX$(TOOLKIT)__</define>
373 <define>$(WXUNIV_DEFINE)</define>
15b44c69
VS
374 <define>$(DEBUG_DEFINE)</define>
375 <define>$(UNICODE_DEFINE)</define>
85ebb95c
VS
376 <!-- this include is added by configure, we need to put other
377 includes before it: -->
378 <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
e2c10c59 379 <lib-path>$(LIBDIRNAME)</lib-path>
ee929bcf 380 <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
432afc17 381 <warnings>max</warnings>
a0177486
WS
382 <cppflags-watcom>
383 -wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
384 -wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
385 -wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
386 -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
387 </cppflags-watcom>
ddf98968
VS
388 </template>
389
c74dc163 390 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 391 <template id="wx_append_base_nomono">
ddf98968 392 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 393 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
394 <sys-lib>$(LIB_JPEG)</sys-lib>
395 <sys-lib>$(LIB_PNG)</sys-lib>
396 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
397 <sys-lib>$(LIB_ODBC)</sys-lib>
398 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 399 <sys-lib>$(LIB_EXPAT)</sys-lib>
e2c10c59 400
2cc75628 401 <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
15b44c69
VS
402
403 <!-- system libraries on windows: -->
404 <if cond="FORMAT!='autoconf'">
416f5bc8 405 <sys-lib>$(UNICOWS_LIB)</sys-lib>
328f5196 406 <if cond="FORMAT=='borland'">
cb8bbc13
VS
407 <sys-lib>ole2w32</sys-lib>
408 </if>
f9c4805a
VS
409 <if cond="FORMAT=='msevc4prj'">
410 <sys-lib>ole32</sys-lib>
411 <sys-lib>oleaut32</sys-lib>
412 <sys-lib>uuid</sys-lib>
413 <sys-lib>commctrl</sys-lib>
f9c4805a
VS
414 <sys-lib>winsock</sys-lib>
415 <sys-lib>wininet</sys-lib>
416 </if>
417 <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'">
cb8bbc13
VS
418 <sys-lib>kernel32</sys-lib>
419 <sys-lib>user32</sys-lib>
420 <sys-lib>gdi32</sys-lib>
421 <sys-lib>comdlg32</sys-lib>
422 <sys-lib>winspool</sys-lib>
423 <sys-lib>winmm</sys-lib>
424 <sys-lib>shell32</sys-lib>
cb8bbc13 425 <sys-lib>comctl32</sys-lib>
cb8bbc13
VS
426 <sys-lib>ole32</sys-lib>
427 <sys-lib>oleaut32</sys-lib>
428 <sys-lib>uuid</sys-lib>
429 <sys-lib>rpcrt4</sys-lib>
430 <sys-lib>advapi32</sys-lib>
431 <sys-lib>wsock32</sys-lib>
15b44c69 432 </if>
57670219 433 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
3682ea7d
VS
434 <sys-lib>oleacc</sys-lib>
435 </if>
f9c4805a
VS
436 <if cond="FORMAT!='msevc4prj'">
437 <sys-lib>odbc32</sys-lib>
438 </if>
57670219 439 </if>
ddf98968
VS
440 </template>
441
82ca3afe 442
c74dc163 443 <!-- for GUI libs/samples: -->
e83a52a2 444 <template id="wx_append_nomono" template="wx_append_base_nomono">
2cc75628 445 <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
c74dc163
VS
446 </template>
447
e83a52a2
VS
448
449 <template id="wx_append_base" template_append="wx_append_base_nomono">
450 <!-- Always link against the wxWin library in monolithic build: -->
451 <sys-lib>$(WXLIB_MONO)</sys-lib>
452 </template>
453 <template id="wx_append" template_append="wx_append_nomono">
454 <!-- Always link against the wxWin library in monolithic build: -->
455 <sys-lib>$(WXLIB_MONO)</sys-lib>
456 </template>
e2c10c59 457
e83a52a2 458
0469579d 459 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
e2c10c59 460
4843dc4c 461 <template id="wx_lib_b" template="wx,anylib">
ddf98968 462 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 463 <libname>$(WXLIBNAME)</libname>
cb8bbc13 464
0469579d 465 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
a92d711e 466 <if cond="FORMAT!='autoconf' and TOOLKIT=='MSW'">
0469579d
VS
467 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
468 <precomp-headers-gen>
469 $(WXTOPDIR)src/msw/dummy.cpp
470 </precomp-headers-gen>
471 </if>
472 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
473 <precomp-headers>on</precomp-headers>
474 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
3fe70739
VS
475 <precomp-headers-exclude>
476 src/common/unzip.c
477 src/common/extended.c
ebee3cd0
VS
478 src/msw/gsocket.cpp
479 src/msw/gsockmsw.cpp
3fe70739 480 </precomp-headers-exclude>
cb8bbc13 481 </if>
e2c10c59 482
3a811096 483 <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
82ca3afe
VS
484 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
485 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
486 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
487 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
488 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
489 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
82ca3afe
VS
490 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
491 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
492 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
493 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
cbba971f 494 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
82ca3afe 495 </if>
ddf98968 496 </template>
cb8bbc13 497
fab9850d 498 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
499 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
500 <dllname>$(WXDLLNAME)</dllname>
501 <version>$(WX_VERSION)</version>
502 <so_version>$(WXSOVERSION)</so_version>
503 <mac_version>$(WXMACVERSION)</mac_version>
504 </template>
c0608865 505
5c802b3d 506 <template id="wx_3rdparty_dependencies">
3fe70739
VS
507 <depends>wxtiff</depends>
508 <depends>wxjpeg</depends>
509 <depends>wxpng</depends>
390c0cfb 510 <depends>wxexpat</depends>
c74dc163 511 <depends>wxzlib</depends>
3fe70739 512 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
c74dc163
VS
513 <depends>wxregex</depends>
514 </template>
ee929bcf
VS
515
516 <template id="wx_3rdparty_includes">
517 <include>$(INC_TIFF)</include>
518 <include>$(INC_JPEG)</include>
519 <include>$(INC_PNG)</include>
520 <include>$(INC_ZLIB)</include>
521 <include>$(INC_ODBC)</include>
522 <include>$(INC_REGEX)</include>
523 <include>$(INC_EXPAT)</include>
524 </template>
e2c10c59 525
9698d244
VS
526 <template id="wx_lib"
527 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
528 <template id="wx_base_lib"
529 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
e2c10c59 530 <define>wxUSE_GUI=0</define>
15d93f1e
VS
531 </template>
532
ee929bcf
VS
533 <template id="wx_dll"
534 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 535 template_append="msvc_setup_h,wx_append_nomono"/>
ee929bcf
VS
536 <template id="wx_base_dll"
537 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 538 template_append="msvc_setup_h,wx_append_base_nomono">
e2c10c59 539 <define>wxUSE_GUI=0</define>
15d93f1e 540 </template>
e2c10c59 541
ae4ae157 542 <!-- =============================================================== -->
77ffb593 543 <!-- Templates for building wxWidgets plugins: -->
ae4ae157
VS
544 <!-- =============================================================== -->
545
ae4ae157 546 <if cond="WX_STABLE_BRANCH=='1'">
c79241a2 547 <set var="PLUGIN_VERSION0">
a1bf307a
RL
548 <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
549 <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
ae4ae157
VS
550 </set>
551 </if>
552 <if cond="WX_STABLE_BRANCH=='0'">
c79241a2 553 <set var="PLUGIN_VERSION0">
a1bf307a
RL
554 <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
555 <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
ae4ae157
VS
556 </set>
557 </if>
c79241a2
VS
558 <set var="PLUGVERDELIM">
559 <if cond="PLATFORM_UNIX=='1'">-</if>
560 <if cond="PLATFORM_UNIX=='0'"></if>
561 </set>
562 <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
e2c10c59 563
c79241a2
VS
564 <set var="PLUGINSUFFIX">
565 <if cond="UNICODE=='0' and BUILD=='release'"></if>
314a6446
VS
566 <if cond="UNICODE=='0' and BUILD=='debug'">d</if>
567 <if cond="UNICODE=='1' and BUILD=='release'">u</if>
568 <if cond="UNICODE=='1' and BUILD=='debug'">ud</if>
c79241a2
VS
569 </set>
570
571 <set var="PLUGINS_INST_DIR" make_var="1">
572 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
573 </set>
ae4ae157
VS
574
575 <define-rule name="wx-base-plugin" extends="module">
576 <template>
577 <dllname>
c79241a2 578 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
579 </dllname>
580 <define>WXUSINGDLL</define>
15d93f1e 581 <define>wxUSE_GUI=0</define>
c79241a2 582 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
583 </template>
584 </define-rule>
e2c10c59 585
ae4ae157
VS
586 <define-rule name="wx-gui-plugin" extends="module">
587 <template template="wx">
588 <dllname>
c79241a2 589 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
590 </dllname>
591 <define>WXUSINGDLL</define>
c79241a2 592 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
593 </template>
594 </define-rule>
e2c10c59 595
ddf98968 596 <!-- =============================================================== -->
77ffb593 597 <!-- Support for wxWidgets samples and contrib: -->
ddf98968
VS
598 <!-- =============================================================== -->
599
600 <!-- Link against one wxWin library. Value must be literal! -->
485a205e 601 <define-tag name="wx-lib" rules="exe,dll,module">
ddf98968 602 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
22cef566 603 <ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
3a811096 604 <if cond="IS_MSVC_PRJ=='1' and MONOLITHIC=='0'">
dce0742b 605 <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
7bd54b68 606 </if>
ddf98968
VS
607 </define-tag>
608
4bae0a94
VS
609
610 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
611 {top_srcdir} from configure, poor bakefile can't know that
612 and won't output top_srcdir = @top_srcdir@ line): -->
613 <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
614
615
ddf98968 616</makefile>