]>
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">$(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 | ||
170 | <if cond="FORMAT!='autoconf'"> | |
171 | <define>WINVER=0x0400</define> | |
172 | <define>_WIN32_IE=0x0400</define> | |
173 | <define>STRICT</define> | |
174 | <cppflags>$(EXTRACFLAGS)</cppflags> | |
175 | </if> | |
176 | ||
177 | </template> | |
178 | ||
179 | <template id="3rdparty_lib" template="anylib"> | |
180 | <libname>$(id)$(WXDEBUGFLAG)</libname> | |
181 | </template> | |
182 | ||
183 | ||
184 | <!-- =============================================================== --> | |
185 | <!-- 3rd party libs: --> | |
186 | <!-- =============================================================== --> | |
187 | ||
188 | <!-- 3rd party libraries: --> | |
189 | <include file="regex.bkl"/> | |
190 | <include file="zlib.bkl"/> | |
191 | <include file="png.bkl"/> | |
192 | <include file="jpeg.bkl"/> | |
193 | <include file="tiff.bkl"/> | |
194 | <include file="odbc.bkl"/> | |
195 | ||
196 | ||
197 | <!-- =============================================================== --> | |
198 | <!-- Templates for wxWindows libs: --> | |
199 | <!-- =============================================================== --> | |
200 | ||
201 | <template id="wx"> | |
202 | <set var="wxid">$(wxwin.mk_wxid(id))</set> | |
203 | <define>__WX$(TOOLKIT)__</define> | |
204 | <define>$(WXUNIV_DEFINE)</define> | |
205 | <define>$(DEBUG_DEFINE)</define> | |
206 | <define>$(UNICODE_DEFINE)</define> | |
207 | <include>$(TOP_SRCDIR)include</include> | |
208 | <lib-path>$(LIBDIRNAME)</lib-path> | |
209 | <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include> | |
210 | <include>$(INC_TIFF)</include> | |
211 | <include>$(INC_JPEG)</include> | |
212 | <include>$(INC_PNG)</include> | |
213 | <include>$(INC_ZLIB)</include> | |
214 | <include>$(INC_ODBC)</include> | |
215 | <include>$(INC_REGEX)</include> | |
216 | </template> | |
217 | ||
218 | <template id="wx_append"> | |
219 | <!-- link against builtin 3rd party libs, if needed: --> | |
220 | <sys-lib>$(LIB_TIFF)</sys-lib> | |
221 | <sys-lib>$(LIB_JPEG)</sys-lib> | |
222 | <sys-lib>$(LIB_PNG)</sys-lib> | |
223 | <sys-lib>$(LIB_ZLIB)</sys-lib> | |
224 | <sys-lib>$(LIB_ODBC)</sys-lib> | |
225 | <sys-lib>$(LIB_REGEX)</sys-lib> | |
226 | ||
227 | <ldlibs>$(EXTRALIBS)</ldlibs> | |
228 | ||
229 | <!-- system libraries on windows: --> | |
230 | <if cond="FORMAT!='autoconf'"> | |
231 | <if cond="COMPILER=='bcc'"> | |
232 | <sys-lib>import32</sys-lib> | |
233 | <sys-lib>ole2w32</sys-lib> | |
234 | </if> | |
235 | <if cond="COMPILER!='bcc'"> | |
236 | <sys-lib>kernel32</sys-lib> | |
237 | <sys-lib>user32</sys-lib> | |
238 | <sys-lib>gdi32</sys-lib> | |
239 | <sys-lib>comdlg32</sys-lib> | |
240 | <sys-lib>winspool</sys-lib> | |
241 | <sys-lib>winmm</sys-lib> | |
242 | <sys-lib>shell32</sys-lib> | |
243 | <sys-lib>oldnames</sys-lib> | |
244 | <sys-lib>comctl32</sys-lib> | |
245 | <sys-lib>odbc32</sys-lib> | |
246 | <sys-lib>ole32</sys-lib> | |
247 | <sys-lib>oleaut32</sys-lib> | |
248 | <sys-lib>uuid</sys-lib> | |
249 | <sys-lib>rpcrt4</sys-lib> | |
250 | <sys-lib>advapi32</sys-lib> | |
251 | <sys-lib>wsock32</sys-lib> | |
252 | </if> | |
253 | </if> | |
254 | </template> | |
255 | ||
256 | <template id="wx_lib_b" template="wx,anylib"> | |
257 | <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set> | |
258 | <libname>$(WXLIBNAME)</libname> | |
259 | ||
260 | <if cond="FORMAT!='autoconf'"> | |
261 | <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources> | |
262 | <precomp-headers-gen> | |
263 | $(WXTOPDIR)src/msw/dummy.cpp | |
264 | </precomp-headers-gen> | |
265 | </if> | |
266 | <precomp-headers-header>wx/wxprec.h</precomp-headers-header> | |
267 | <precomp-headers>on</precomp-headers> | |
268 | <precomp-headers-file>wxprec_$(id)</precomp-headers-file> | |
269 | </template> | |
270 | ||
271 | <template id="wx_dll_b" template="wx_lib_b"> | |
272 | <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set> | |
273 | <dllname>$(WXDLLNAME)</dllname> | |
274 | <version>$(WX_VERSION)</version> | |
275 | <so_version>$(WXSOVERSION)</so_version> | |
276 | <mac_version>$(WXMACVERSION)</mac_version> | |
277 | </template> | |
278 | ||
279 | <template id="wx_lib" template="wx_lib_b"/> | |
280 | <template id="wx_dll" template="wx_dll_b" template_append="wx_append"> | |
281 | <depends>wxtiff</depends> | |
282 | <depends>wxjpeg</depends> | |
283 | <depends>wxpng</depends> | |
284 | <depends>wxzlib</depends> | |
285 | <depends cond="FORMAT=='autoconf'">wxodbc</depends> | |
286 | <depends>wxregex</depends> | |
287 | </template> | |
288 | ||
289 | <!-- =============================================================== --> | |
290 | <!-- Support for wxWindows samples and contrib: --> | |
291 | <!-- =============================================================== --> | |
292 | ||
293 | <!-- Link against one wxWin library. Value must be literal! --> | |
294 | <define-tag name="wx-lib" rules="exe,dll"> | |
295 | <sys-lib>$(wxwin.libToLink(value))</sys-lib> | |
296 | </define-tag> | |
297 | ||
298 | </makefile> |