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