]>
Commit | Line | Data |
---|---|---|
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="WXSOVERSION">0.0.0</set> | |
25 | <set var="WXMACVERSION">$(WX_VERSION)</set> | |
26 | ||
27 | ||
28 | <!-- ================================================================== --> | |
29 | <!-- Names of libraries and DLLs: --> | |
30 | <!-- ================================================================== --> | |
31 | ||
32 | <set var="PORTNAME"> | |
33 | <if cond="USE_GUI=='0'">base</if> | |
34 | <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if> | |
35 | </set> | |
36 | ||
37 | <set var="COMPILERORGCC"> | |
38 | <if cond="isdefined('COMPILER')">$(COMPILER)</if> | |
39 | <if cond="not isdefined('COMPILER')">gcc</if> | |
40 | </set> | |
41 | <set var="WXCOMPILER"> | |
42 | <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if> | |
43 | </set> | |
44 | ||
45 | <set var="VENDORTAG"> | |
46 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if> | |
47 | <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if> | |
48 | </set> | |
49 | ||
50 | <set var="WXDEBUGFLAG"> | |
51 | <if cond="BUILD=='debug'">d</if> | |
52 | </set> | |
53 | <set var="WXUNICODEFLAG"> | |
54 | <if cond="UNICODE=='1'">u</if> | |
55 | </set> | |
56 | <set var="WXNAMESUFFIX"> | |
57 | $(WXUNICODEFLAG)$(WXDEBUGFLAG) | |
58 | </set> | |
59 | ||
60 | <set var="WXUNIVNAME"> | |
61 | <if cond="WXUNIV=='1'">univ</if> | |
62 | </set> | |
63 | <set var="WXUNIV_DEFINE"> | |
64 | <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if> | |
65 | </set> | |
66 | ||
67 | <if cond="FORMAT=='autoconf'"> | |
68 | <set var="WXNAMEPREFIX">wx</set> | |
69 | <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set> | |
70 | <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set> | |
71 | </if> | |
72 | <if cond="FORMAT!='autoconf'"> | |
73 | <set var="WXNAMEPREFIX">wx$(WXVER_MAJOR)$(WXVER_MINOR)</set> | |
74 | <set var="WXNAMEPREFIXGUI">wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)</set> | |
75 | <set var="WXVERSIONTAG"></set> | |
76 | </if> | |
77 | <set var="WXDLLNAMEPREFIX"> | |
78 | <if cond="PLATFORM_WIN32=='1'">wx$(WXVER_MAJOR)$(WXVER_MINOR)</if> | |
79 | <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if> | |
80 | </set> | |
81 | <set var="WXDLLNAMEPREFIXGUI"> | |
82 | <if cond="PLATFORM_WIN32=='1'"> | |
83 | wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR) | |
84 | </if> | |
85 | <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if> | |
86 | </set> | |
87 | <set var="WXDLLVERSIONTAG"> | |
88 | <if cond="PLATFORM_WIN32=='1'"></if> | |
89 | <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if> | |
90 | </set> | |
91 | ||
92 | <set var="TOOLCHAIN_NAME"> | |
93 | $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-$(WXVER_MAJOR).$(WXVER_MINOR) | |
94 | </set> | |
95 | ||
96 | ||
97 | <!-- =============================================================== --> | |
98 | <!-- Names of component libraries: --> | |
99 | <!-- =============================================================== --> | |
100 | ||
101 | <set var="WXLIB_BASE"> | |
102 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if> | |
103 | </set> | |
104 | <set var="WXLIB_CORE"> | |
105 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if> | |
106 | </set> | |
107 | <set var="WXLIB_HTML"> | |
108 | <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if> | |
109 | </set> | |
110 | ||
111 | <set var="WXLIB_MONO"> | |
112 | <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if> | |
113 | </set> | |
114 | ||
115 | ||
116 | <!-- =============================================================== --> | |
117 | <!-- Where to store built libraries and objects: --> | |
118 | <!-- =============================================================== --> | |
119 | ||
120 | ||
121 | <if cond="FORMAT!='autoconf'"> | |
122 | <set var="WXDLLFLAG"> | |
123 | <if cond="SHARED=='1'">dll</if> | |
124 | </set> | |
125 | <set var="CFG_NAME_PART"> | |
126 | $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) | |
127 | </set> | |
128 | <set var="OBJS" make_var="1">objs_$(COMPILER)_$(CFG_NAME_PART)</set> | |
129 | <set var="BUILDDIR">$(OBJS)</set> | |
130 | </if> | |
131 | ||
132 | <set var="LIBDIRNAME"> | |
133 | <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if> | |
134 | <if cond="FORMAT!='autoconf'"> | |
135 | $(TOP_SRCDIR)lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART) | |
136 | </if> | |
137 | </set> | |
138 | ||
139 | ||
140 | <!-- =============================================================== --> | |
141 | <!-- Templates for libs: --> | |
142 | <!-- =============================================================== --> | |
143 | ||
144 | <set var="DEBUGFLAG"> | |
145 | <if cond="BUILD=='debug'">on</if> | |
146 | <if cond="BUILD=='release'">off</if> | |
147 | </set> | |
148 | <set var="OPTIMIZEFLAG"> | |
149 | <if cond="BUILD=='debug'">off</if> | |
150 | <if cond="BUILD=='release'">speed</if> | |
151 | </set> | |
152 | ||
153 | <set var="DEBUG_DEFINE"> | |
154 | <if cond="FORMAT!='autoconf' and BUILD=='debug'">__WXDEBUG__</if> | |
155 | </set> | |
156 | <set var="UNICODE_DEFINE"> | |
157 | <if cond="FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=1</if> | |
158 | </set> | |
159 | ||
160 | <template id="anylib"> | |
161 | <depends cond="FORMAT!='autoconf' and BUILDING_LIB=='1'">setup.h</depends> | |
162 | <dirname>$(LIBDIRNAME)</dirname> | |
163 | <install-to>$(LIBDIR)</install-to> | |
164 | ||
165 | <debug-info>$(DEBUGFLAG)</debug-info> | |
166 | <optimize>$(OPTIMIZEFLAG)</optimize> | |
167 | <threading>multi</threading> | |
168 | <runtime-libs>dynamic</runtime-libs> | |
169 | </template> | |
170 | ||
171 | <template id="3rdparty_lib" template="anylib"> | |
172 | <libname>$(id)$(WXDEBUGFLAG)</libname> | |
173 | </template> | |
174 | ||
175 | ||
176 | <!-- =============================================================== --> | |
177 | <!-- 3rd party libs: --> | |
178 | <!-- =============================================================== --> | |
179 | ||
180 | <!-- 3rd party libraries: --> | |
181 | <include file="regex.bkl"/> | |
182 | <include file="zlib.bkl"/> | |
183 | <include file="png.bkl"/> | |
184 | <include file="jpeg.bkl"/> | |
185 | <include file="tiff.bkl"/> | |
186 | <include file="odbc.bkl"/> | |
187 | ||
188 | ||
189 | <!-- =============================================================== --> | |
190 | <!-- Templates for wxWindows libs: --> | |
191 | <!-- =============================================================== --> | |
192 | ||
193 | <template id="wx"> | |
194 | <set var="wxid">$(wxwin.mk_wxid(id))</set> | |
195 | <define>__WX$(TOOLKIT)__</define> | |
196 | <define>$(WXUNIV_DEFINE)</define> | |
197 | <define>$(DEBUG_DEFINE)</define> | |
198 | <define>$(UNICODE_DEFINE)</define> | |
199 | <include>$(TOP_SRCDIR)include</include> | |
200 | <lib-path>$(LIBDIRNAME)</lib-path> | |
201 | <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include> | |
202 | <include>$(INC_TIFF)</include> | |
203 | <include>$(INC_JPEG)</include> | |
204 | <include>$(INC_PNG)</include> | |
205 | <include>$(INC_ZLIB)</include> | |
206 | <include>$(INC_ODBC)</include> | |
207 | <include>$(INC_REGEX)</include> | |
208 | </template> | |
209 | ||
210 | <template id="wx_append"> | |
211 | <!-- link against builtin 3rd party libs, if needed: --> | |
212 | <sys-lib>$(LIB_TIFF)</sys-lib> | |
213 | <sys-lib>$(LIB_JPEG)</sys-lib> | |
214 | <sys-lib>$(LIB_PNG)</sys-lib> | |
215 | <sys-lib>$(LIB_ZLIB)</sys-lib> | |
216 | <sys-lib>$(LIB_ODBC)</sys-lib> | |
217 | <sys-lib>$(LIB_REGEX)</sys-lib> | |
218 | ||
219 | <ldlibs>$(EXTRALIBS)</ldlibs> | |
220 | ||
221 | <!-- system libraries on windows: --> | |
222 | <if cond="FORMAT!='autoconf'"> | |
223 | <if cond="COMPILER=='bcc'"> | |
224 | <sys-lib>import32</sys-lib> | |
225 | </if> | |
226 | </if> | |
227 | </template> | |
228 | ||
229 | <template id="wx_lib_b" template="wx,anylib"> | |
230 | <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set> | |
231 | <libname>$(WXLIBNAME)</libname> | |
232 | <precomp-headers>on</precomp-headers> | |
233 | <precomp-headers-file>wxprec</precomp-headers-file> | |
234 | </template> | |
235 | ||
236 | <template id="wx_dll_b" template="wx_lib_b"> | |
237 | <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set> | |
238 | <dllname>$(WXDLLNAME)</dllname> | |
239 | <version>$(WX_VERSION)</version> | |
240 | <so_version>$(WXSOVERSION)</so_version> | |
241 | <mac_version>$(WXMACVERSION)</mac_version> | |
242 | </template> | |
243 | ||
244 | <template id="wx_lib" template="wx_lib_b"/> | |
245 | <template id="wx_dll" template="wx_dll_b" template_append="wx_append"> | |
246 | <depends>wxtiff</depends> | |
247 | <depends>wxjpeg</depends> | |
248 | <depends>wxpng</depends> | |
249 | <depends>wxzlib</depends> | |
250 | <depends cond="FORMAT=='autoconf'">wxodbc</depends> | |
251 | <depends>wxregex</depends> | |
252 | </template> | |
253 | ||
254 | <!-- =============================================================== --> | |
255 | <!-- Support for wxWindows samples and contrib: --> | |
256 | <!-- =============================================================== --> | |
257 | ||
258 | <!-- Link against one wxWin library. Value must be literal! --> | |
259 | <define-tag name="wx-lib" rules="exe,dll"> | |
260 | <sys-lib>$(wxwin.libToLink(value))</sys-lib> | |
261 | </define-tag> | |
262 | ||
263 | </makefile> |