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