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