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