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