]> git.saurik.com Git - wxWidgets.git/blob - build/bakefiles/common.bkl
added rendcmn.cpp
[wxWidgets.git] / build / bakefiles / common.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5
6 <!-- bakefile modules we need: -->
7 <using module="datafiles"/>
8
9 <!-- load python module with wxwindows helpers: -->
10 <using module="wxwin"/>
11
12 <include file="config.bkl"/>
13
14
15 <!-- ================================================================== -->
16 <!-- wxWindows version numbers: -->
17 <!-- ================================================================== -->
18
19 <set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
20 <set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
21 <set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
22 <set var="WX_VERSION">$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)</set>
23
24 <set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
25
26 <set var="WXSOVERSION">
27 <if cond="WX_STABLE_BRANCH=='1'">0.0.0</if>
28 <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE).0.0</if>
29 </set>
30 <set var="WXMACVERSION">$(WX_VERSION)</set>
31 <set var="WXWIN32DLLVERSION">
32 <if cond="WX_STABLE_BRANCH=='1'">$(WXVER_MAJOR)$(WXVER_MINOR)</if>
33 <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)</if>
34 </set>
35
36
37 <!-- ================================================================== -->
38 <!-- Names of libraries and DLLs: -->
39 <!-- ================================================================== -->
40
41 <set var="PORTNAME">
42 <if cond="USE_GUI=='0'">base</if>
43 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
44 </set>
45
46 <set var="WXBASEPORT">
47 <if cond="TOOLKIT=='MAC'">_carbon</if>
48 </set>
49
50 <set var="COMPILERORGCC">
51 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
52 <if cond="not isdefined('COMPILER')">gcc</if>
53 </set>
54 <set var="WXCOMPILER">
55 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
56 </set>
57
58 <set var="VENDORTAG">
59 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
60 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
61 </set>
62
63 <set var="WXDEBUGFLAG">
64 <if cond="BUILD=='debug'">d</if>
65 </set>
66 <set var="WXUNICODEFLAG">
67 <if cond="UNICODE=='1'">u</if>
68 </set>
69 <set var="WXNAMESUFFIX">
70 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
71 </set>
72
73 <set var="WXUNIVNAME">
74 <if cond="WXUNIV=='1'">univ</if>
75 </set>
76 <set var="WXUNIV_DEFINE">
77 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
78 </set>
79
80 <if cond="FORMAT=='autoconf'">
81 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
82 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
83 <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set>
84 </if>
85 <if cond="FORMAT!='autoconf'">
86 <set var="WXNAMEPREFIX">
87 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
88 </set>
89 <set var="WXNAMEPREFIXGUI">
90 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)</set>
91 <set var="WXVERSIONTAG"></set>
92 </if>
93 <set var="WXDLLNAMEPREFIX">
94 <if cond="PLATFORM_WIN32=='1'">
95 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
96 </if>
97 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
98 </set>
99 <set var="WXDLLNAMEPREFIXGUI">
100 <if cond="PLATFORM_WIN32=='1'">
101 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
102 </if>
103 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
104 </set>
105 <set var="WXDLLVERSIONTAG">
106 <if cond="PLATFORM_WIN32=='1'"></if>
107 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
108 </set>
109
110
111 <!-- =============================================================== -->
112 <!-- Names of component libraries: -->
113 <!-- =============================================================== -->
114
115 <set var="WXLIB_BASE">
116 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
117 </set>
118 <set var="WXLIB_NET">
119 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
120 </set>
121 <set var="WXLIB_CORE">
122 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
123 </set>
124 <set var="WXLIB_HTML">
125 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
126 </set>
127 <set var="WXLIB_XML">
128 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
129 </set>
130
131 <set var="WXLIB_MONO">
132 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
133 </set>
134
135
136 <!-- =============================================================== -->
137 <!-- Where to store built libraries and objects: -->
138 <!-- =============================================================== -->
139
140
141 <if cond="FORMAT!='autoconf'">
142 <set var="WXDLLFLAG">
143 <if cond="SHARED=='1'">dll</if>
144 </set>
145 <set var="CFG_NAME_PART">
146 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
147 </set>
148 <set var="OBJS" make_var="1">$(COMPILER)_$(CFG_NAME_PART)</set>
149 <set var="BUILDDIR">$(OBJS)</set>
150 </if>
151
152 <set var="LIBDIRNAME" make_var="1">
153 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
154 <if cond="FORMAT!='autoconf'">
155 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
156 </if>
157 </set>
158
159
160 <!-- =============================================================== -->
161 <!-- Templates for libs: -->
162 <!-- =============================================================== -->
163
164 <set var="DEBUGFLAG">
165 <if cond="BUILD=='debug'">on</if>
166 <if cond="BUILD=='release'">off</if>
167 </set>
168 <set var="OPTIMIZEFLAG">
169 <if cond="BUILD=='debug'">off</if>
170 <if cond="BUILD=='release'">speed</if>
171 </set>
172
173 <set var="DEBUG_DEFINE">
174 <if cond="FORMAT!='autoconf' and BUILD=='debug'">__WXDEBUG__</if>
175 </set>
176 <set var="UNICODE_DEFINE">
177 <if cond="FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=1</if>
178 </set>
179
180 <template id="common_settings">
181 <debug-info>$(DEBUGFLAG)</debug-info>
182 <optimize>$(OPTIMIZEFLAG)</optimize>
183 <threading>multi</threading>
184 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
185 <if cond="FORMAT!='autoconf'">
186 <cppflags>$(EXTRACFLAGS)</cppflags>
187 </if>
188 </template>
189
190 <template id="anylib">
191 <dirname>$(LIBDIRNAME)</dirname>
192 <install-to>$(LIBDIR)</install-to>
193 </template>
194
195 <template id="3rdparty_lib" template="common_settings,anylib">
196 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
197 </template>
198
199
200 <!-- =============================================================== -->
201 <!-- 3rd party libs: -->
202 <!-- =============================================================== -->
203
204 <!-- 3rd party libraries: -->
205 <include file="regex.bkl"/>
206 <include file="zlib.bkl"/>
207 <include file="png.bkl"/>
208 <include file="jpeg.bkl"/>
209 <include file="tiff.bkl"/>
210 <include file="odbc.bkl"/>
211 <include file="expat.bkl"/>
212
213
214 <!-- =============================================================== -->
215 <!-- Templates for wxWindows libs: -->
216 <!-- =============================================================== -->
217
218 <template id="wx" template="common_settings">
219 <set var="wxid">$(wxwin.mk_wxid(id))</set>
220 <define>__WX$(TOOLKIT)__</define>
221 <define>$(WXUNIV_DEFINE)</define>
222 <define>$(DEBUG_DEFINE)</define>
223 <define>$(UNICODE_DEFINE)</define>
224 <include>$(TOP_SRCDIR)include</include>
225 <lib-path>$(LIBDIRNAME)</lib-path>
226 <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
227 <include>$(INC_TIFF)</include>
228 <include>$(INC_JPEG)</include>
229 <include>$(INC_PNG)</include>
230 <include>$(INC_ZLIB)</include>
231 <include>$(INC_ODBC)</include>
232 <include>$(INC_REGEX)</include>
233 <include>$(INC_EXPAT)</include>
234 </template>
235
236 <!-- for both GUI and wxBase libs/samples: -->
237 <template id="wx_append_base_nomono">
238 <!-- link against builtin 3rd party libs, if needed: -->
239 <sys-lib>$(LIB_TIFF)</sys-lib>
240 <sys-lib>$(LIB_JPEG)</sys-lib>
241 <sys-lib>$(LIB_PNG)</sys-lib>
242 <sys-lib>$(LIB_ZLIB)</sys-lib>
243 <sys-lib>$(LIB_ODBC)</sys-lib>
244 <sys-lib>$(LIB_REGEX)</sys-lib>
245 <sys-lib>$(LIB_EXPAT)</sys-lib>
246
247 <ldlibs>$(EXTRALIBS)</ldlibs>
248
249 <!-- system libraries on windows: -->
250 <if cond="FORMAT!='autoconf'">
251 <if cond="COMPILER=='bcc'">
252 <sys-lib>import32</sys-lib>
253 <sys-lib>ole2w32</sys-lib>
254 </if>
255 <if cond="COMPILER!='bcc'">
256 <sys-lib>kernel32</sys-lib>
257 <sys-lib>user32</sys-lib>
258 <sys-lib>gdi32</sys-lib>
259 <sys-lib>comdlg32</sys-lib>
260 <sys-lib>winspool</sys-lib>
261 <sys-lib>winmm</sys-lib>
262 <sys-lib>shell32</sys-lib>
263 <sys-lib>comctl32</sys-lib>
264 <sys-lib>odbc32</sys-lib>
265 <sys-lib>ole32</sys-lib>
266 <sys-lib>oleaut32</sys-lib>
267 <sys-lib>uuid</sys-lib>
268 <sys-lib>rpcrt4</sys-lib>
269 <sys-lib>advapi32</sys-lib>
270 <sys-lib>wsock32</sys-lib>
271 </if>
272 </if>
273 </template>
274
275 <define-tag name="msvc-headers" rules="dll,lib">
276 <if cond="FORMAT=='msvc6prj'">
277 <msvc-project-files>
278 $(addPrefixToList('include\', wxwin.headersOnly(value)))
279 </msvc-project-files>
280 </if>
281 </define-tag>
282
283 <!-- for GUI libs/samples: -->
284 <template id="wx_append_nomono" template="wx_append_base_nomono">
285 <ldlibs>$(EXTRALIBS_GUI)</ldlibs>
286 </template>
287
288
289 <template id="wx_append_base" template_append="wx_append_base_nomono">
290 <!-- Always link against the wxWin library in monolithic build: -->
291 <sys-lib>$(WXLIB_MONO)</sys-lib>
292 </template>
293 <template id="wx_append" template_append="wx_append_nomono">
294 <!-- Always link against the wxWin library in monolithic build: -->
295 <sys-lib>$(WXLIB_MONO)</sys-lib>
296 </template>
297
298
299 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
300
301 <template id="wx_lib_b" template="wx,anylib">
302 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
303 <libname>$(WXLIBNAME)</libname>
304
305 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
306 <if cond="FORMAT!='autoconf'">
307 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
308 <precomp-headers-gen>
309 $(WXTOPDIR)src/msw/dummy.cpp
310 </precomp-headers-gen>
311 </if>
312 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
313 <precomp-headers>on</precomp-headers>
314 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
315 <precomp-headers-exclude>
316 src/common/unzip.c
317 src/common/extended.c
318 src/msw/gsocket.c
319 src/msw/gsockmsw.c
320 </precomp-headers-exclude>
321 </if>
322 </template>
323
324 <template id="wx_dll_b" template="wx_lib_b">
325 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
326 <dllname>$(WXDLLNAME)</dllname>
327 <version>$(WX_VERSION)</version>
328 <so_version>$(WXSOVERSION)</so_version>
329 <mac_version>$(WXMACVERSION)</mac_version>
330 </template>
331
332 <template id="wx_lib" template="wx_lib_b"/>
333 <template id="wx_base_lib" template="wx_lib_b"/>
334 <template id="wx_dll" template="wx_dll_b"
335 template_append="wx_append_nomono">
336 <depends>wxtiff</depends>
337 <depends>wxjpeg</depends>
338 <depends>wxpng</depends>
339 <depends>wxexpat</depends>
340 <depends>wxzlib</depends>
341 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
342 <depends>wxregex</depends>
343 </template>
344 <template id="wx_base_dll" template="wx_dll_b"
345 template_append="wx_append_base_nomono">
346 <depends>wxtiff</depends>
347 <depends>wxjpeg</depends>
348 <depends>wxpng</depends>
349 <depends>wxexpat</depends>
350 <depends>wxzlib</depends>
351 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
352 <depends>wxregex</depends>
353 </template>
354
355 <!-- =============================================================== -->
356 <!-- Support for wxWindows samples and contrib: -->
357 <!-- =============================================================== -->
358
359 <!-- Link against one wxWin library. Value must be literal! -->
360 <define-tag name="wx-lib" rules="exe,dll">
361 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
362 </define-tag>
363
364 </makefile>