]> git.saurik.com Git - wxWidgets.git/blob - build/bakefiles/common.bkl
Removed wxGetOsVersion stub. It's now handled by utilscmn.cpp.
[wxWidgets.git] / build / bakefiles / common.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5
6 <set var="BUILDING_LIB" overwrite="0">0</set>
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
17 <!-- ================================================================== -->
18 <!-- wxWindows version numbers: -->
19 <!-- ================================================================== -->
20
21 <set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
22 <set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
23 <set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
24 <set var="WX_VERSION">$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)</set>
25
26 <set var="WXSOVERSION">0.0.0</set>
27 <set var="WXMACVERSION">$(WX_VERSION)</set>
28
29
30 <!-- ================================================================== -->
31 <!-- Names of libraries and DLLs: -->
32 <!-- ================================================================== -->
33
34 <set var="PORTNAME">
35 <if cond="USE_GUI=='0'">base</if>
36 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
37 </set>
38
39 <set var="COMPILERORGCC">
40 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
41 <if cond="not isdefined('COMPILER')">gcc</if>
42 </set>
43 <set var="WXCOMPILER">
44 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
45 </set>
46
47 <set var="WXDEBUGFLAG">
48 <if cond="BUILD=='debug'">d</if>
49 </set>
50 <set var="WXUNICODEFLAG">
51 <if cond="UNICODE=='1'">u</if>
52 </set>
53 <set var="WXNAMESUFFIX">
54 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
55 </set>
56
57 <set var="WXUNIVNAME">
58 <if cond="WXUNIV=='1'">univ</if>
59 </set>
60 <set var="WXUNIV_DEFINE">
61 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
62 </set>
63
64 <if cond="FORMAT=='autoconf'">
65 <set var="WXNAMEPREFIX">wx</set>
66 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
67 <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set>
68 </if>
69 <if cond="FORMAT!='autoconf'">
70 <set var="WXNAMEPREFIX">wx$(WXVER_MAJOR)$(WXVER_MINOR)</set>
71 <set var="WXNAMEPREFIXGUI">wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)</set>
72 <set var="WXVERSIONTAG"></set>
73 </if>
74
75 <set var="TOOLCHAIN_NAME">
76 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-$(WXVER_MAJOR).$(WXVER_MINOR)
77 </set>
78
79
80 <!-- =============================================================== -->
81 <!-- Names of component libraries: -->
82 <!-- =============================================================== -->
83
84 <set var="WXLIB_BASE">
85 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
86 </set>
87 <set var="WXLIB_CORE">
88 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
89 </set>
90 <set var="WXLIB_HTML">
91 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
92 </set>
93
94 <set var="WXLIB_MONO">
95 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
96 </set>
97
98
99 <!-- =============================================================== -->
100 <!-- Where to store built libraries: -->
101 <!-- =============================================================== -->
102
103 <set var="LIBDIRNAME">
104 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
105 <if cond="FORMAT!='autoconf'">$(TOP_SRCDIR)lib$(DIRSEP)$(COMPILER)</if>
106 </set>
107
108 <!-- =============================================================== -->
109 <!-- Templates for libs: -->
110 <!-- =============================================================== -->
111
112 <set var="DEBUGFLAG">
113 <if cond="BUILD=='debug'">on</if>
114 <if cond="BUILD=='release'">off</if>
115 </set>
116 <set var="OPTIMIZEFLAG">
117 <if cond="BUILD=='debug'">off</if>
118 <if cond="BUILD=='release'">speed</if>
119 </set>
120
121 <template id="anylib">
122 <depends cond="FORMAT!='autoconf' and BUILDING_LIB=='1'">setup.h</depends>
123 <dirname>$(LIBDIRNAME)</dirname>
124 <install-to>$(LIBDIR)</install-to>
125
126 <debug-info>$(DEBUGFLAG)</debug-info>
127 <optimize>$(OPTIMIZEFLAG)</optimize>
128 <threading>multi</threading>
129 </template>
130
131 <template id="3rdparty_lib" template="anylib">
132 <libname>$(id)$(WXDEBUGFLAG)</libname>
133 </template>
134
135
136 <!-- =============================================================== -->
137 <!-- 3rd party libs: -->
138 <!-- =============================================================== -->
139
140 <!-- 3rd party libraries: -->
141 <include file="regex.bkl"/>
142 <include file="zlib.bkl"/>
143 <include file="png.bkl"/>
144 <include file="jpeg.bkl"/>
145 <include file="tiff.bkl"/>
146 <include file="odbc.bkl"/>
147
148
149 <!-- =============================================================== -->
150 <!-- Templates for wxWindows libs: -->
151 <!-- =============================================================== -->
152
153 <template id="wx">
154 <set var="wxid">$(wxwin.mk_wxid(id))</set>
155 <define>__WX$(TOOLKIT)__</define>
156 <define>$(WXUNIV_DEFINE)</define>
157 <include>$(TOP_SRCDIR)include</include>
158 <lib-path>$(LIBDIRNAME)</lib-path>
159 <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
160 <include>$(INC_TIFF)</include>
161 <include>$(INC_JPEG)</include>
162 <include>$(INC_PNG)</include>
163 <include>$(INC_ZLIB)</include>
164 <include>$(INC_ODBC)</include>
165 <include>$(INC_REGEX)</include>
166 </template>
167
168 <template id="wx_append">
169 <ldflags>$(EXTRALIBS)</ldflags>
170 <!-- link against builtin 3rd party libs, if needed: -->
171 <sys-lib>$(LIB_TIFF)</sys-lib>
172 <sys-lib>$(LIB_JPEG)</sys-lib>
173 <sys-lib>$(LIB_PNG)</sys-lib>
174 <sys-lib>$(LIB_ZLIB)</sys-lib>
175 <sys-lib>$(LIB_ODBC)</sys-lib>
176 <sys-lib>$(LIB_REGEX)</sys-lib>
177 </template>
178
179 <template id="wx_lib_b" template="wx,anylib">
180 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
181 <libname>$(WXLIBNAME)</libname>
182 <precomp-headers>on</precomp-headers>
183 <precomp-headers-file>wxprec</precomp-headers-file>
184 </template>
185
186 <template id="wx_dll_b" template="wx_lib_b">
187 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
188 <dllname>$(WXDLLNAME)</dllname>
189 <version>$(WX_VERSION)</version>
190 <so_version>$(WXSOVERSION)</so_version>
191 <mac_version>$(WXMACVERSION)</mac_version>
192 </template>
193
194 <template id="wx_lib" template="wx_lib_b"/>
195 <template id="wx_dll" template="wx_dll_b" template_append="wx_append"/>
196
197 <!-- =============================================================== -->
198 <!-- Support for wxWindows samples and contrib: -->
199 <!-- =============================================================== -->
200
201 <!-- Link against one wxWin library. Value must be literal! -->
202 <define-tag name="wx-lib" rules="exe,dll">
203 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
204 </define-tag>
205
206 </makefile>