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