]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
don't run autoconf automatically, it's problematic on Windows
[wxWidgets.git] / build / bakefiles / common.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
481290e2
VS
2<!-- $Id$ -->
3
ddf98968 4<makefile>
c0608865 5
ddf98968
VS
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
bdc408c4
VS
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>
ddf98968 30 <set var="WXMACVERSION">$(WX_VERSION)</set>
bdc408c4
VS
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>
ddf98968
VS
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>
64a2a46f
VS
45
46 <set var="WXBASEPORT">
47 <if cond="TOOLKIT=='MAC'">_carbon</if>
48 </set>
ddf98968
VS
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>
4fc5f509
VS
57
58 <set var="VENDORTAG">
cff5df9f
VS
59 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
60 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
4fc5f509
VS
61 </set>
62
ddf98968
VS
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
cdc0282e 80 <if cond="FORMAT=='autoconf'">
64a2a46f 81 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
cdc0282e
VS
82 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
83 <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set>
84 </if>
85 <if cond="FORMAT!='autoconf'">
64a2a46f
VS
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>
cdc0282e
VS
91 <set var="WXVERSIONTAG"></set>
92 </if>
4fc5f509 93 <set var="WXDLLNAMEPREFIX">
64a2a46f 94 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 95 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
64a2a46f 96 </if>
4fc5f509
VS
97 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
98 </set>
99 <set var="WXDLLNAMEPREFIXGUI">
100 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 101 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
4fc5f509
VS
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>
ddf98968 109
ddf98968
VS
110
111 <!-- =============================================================== -->
112 <!-- Names of component libraries: -->
113 <!-- =============================================================== -->
114
e86e1522
VS
115 <set var="WXLIB_BASE">
116 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
117 </set>
7c4728f6
VS
118 <set var="WXLIB_NET">
119 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
120 </set>
ddf98968
VS
121 <set var="WXLIB_CORE">
122 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
123 </set>
fab9850d 124 <set var="WXLIB_HTML">
e86e1522 125 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 126 </set>
a69544bf
VS
127 <set var="WXLIB_XML">
128 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
129 </set>
ddf98968
VS
130
131 <set var="WXLIB_MONO">
132 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
133 </set>
134
135
136 <!-- =============================================================== -->
cff5df9f 137 <!-- Where to store built libraries and objects: -->
ddf98968 138 <!-- =============================================================== -->
4843dc4c 139
cff5df9f
VS
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>
bdb03aa9 148 <set var="OBJS" make_var="1">$(COMPILER)_$(CFG_NAME_PART)</set>
cff5df9f
VS
149 <set var="BUILDDIR">$(OBJS)</set>
150 </if>
cff5df9f 151
390c0cfb 152 <set var="LIBDIRNAME" make_var="1">
481290e2 153 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
cff5df9f 154 <if cond="FORMAT!='autoconf'">
390c0cfb 155 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
cff5df9f 156 </if>
ddf98968 157 </set>
cff5df9f 158
4843dc4c
VS
159
160 <!-- =============================================================== -->
161 <!-- Templates for libs: -->
162 <!-- =============================================================== -->
cdc0282e
VS
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">
546a7e42
VS
169 <if cond="BUILD=='debug'">off</if>
170 <if cond="BUILD=='release'">speed</if>
cdc0282e 171 </set>
15b44c69
VS
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>
5e3746dc 179
149cc218 180 <template id="common_settings">
5e3746dc
VS
181 <debug-info>$(DEBUGFLAG)</debug-info>
182 <optimize>$(OPTIMIZEFLAG)</optimize>
183 <threading>multi</threading>
4b44ea2b 184 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
5e3746dc
VS
185 <if cond="FORMAT!='autoconf'">
186 <cppflags>$(EXTRACFLAGS)</cppflags>
187 </if>
188 </template>
4843dc4c
VS
189
190 <template id="anylib">
4843dc4c
VS
191 <dirname>$(LIBDIRNAME)</dirname>
192 <install-to>$(LIBDIR)</install-to>
193 </template>
194
149cc218 195 <template id="3rdparty_lib" template="common_settings,anylib">
ea66c762 196 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
82cb0280
VS
197 </template>
198
ddf98968
VS
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"/>
a69544bf 211 <include file="expat.bkl"/>
ddf98968
VS
212
213
214 <!-- =============================================================== -->
215 <!-- Templates for wxWindows libs: -->
216 <!-- =============================================================== -->
cdc0282e 217
149cc218 218 <template id="wx" template="common_settings">
ddf98968
VS
219 <set var="wxid">$(wxwin.mk_wxid(id))</set>
220 <define>__WX$(TOOLKIT)__</define>
221 <define>$(WXUNIV_DEFINE)</define>
15b44c69
VS
222 <define>$(DEBUG_DEFINE)</define>
223 <define>$(UNICODE_DEFINE)</define>
4843dc4c 224 <include>$(TOP_SRCDIR)include</include>
cdc0282e 225 <lib-path>$(LIBDIRNAME)</lib-path>
4843dc4c
VS
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>
e3b108b8 233 <include>$(INC_EXPAT)</include>
ddf98968
VS
234 </template>
235
c74dc163 236 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 237 <template id="wx_append_base_nomono">
ddf98968 238 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 239 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
240 <sys-lib>$(LIB_JPEG)</sys-lib>
241 <sys-lib>$(LIB_PNG)</sys-lib>
242 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
243 <sys-lib>$(LIB_ODBC)</sys-lib>
244 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 245 <sys-lib>$(LIB_EXPAT)</sys-lib>
15b44c69
VS
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>
cb8bbc13
VS
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>
cb8bbc13
VS
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>
15b44c69
VS
271 </if>
272 </if>
ddf98968
VS
273 </template>
274
390c0cfb
VS
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
c74dc163 283 <!-- for GUI libs/samples: -->
e83a52a2 284 <template id="wx_append_nomono" template="wx_append_base_nomono">
c74dc163
VS
285 <ldlibs>$(EXTRALIBS_GUI)</ldlibs>
286 </template>
287
e83a52a2
VS
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
0469579d
VS
299 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
300
4843dc4c 301 <template id="wx_lib_b" template="wx,anylib">
ddf98968 302 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 303 <libname>$(WXLIBNAME)</libname>
cb8bbc13 304
0469579d
VS
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>
3fe70739
VS
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>
cb8bbc13 321 </if>
ddf98968 322 </template>
cb8bbc13 323
fab9850d 324 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
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>
c0608865 331
fab9850d 332 <template id="wx_lib" template="wx_lib_b"/>
c74dc163 333 <template id="wx_base_lib" template="wx_lib_b"/>
e83a52a2
VS
334 <template id="wx_dll" template="wx_dll_b"
335 template_append="wx_append_nomono">
15b44c69
VS
336 <depends>wxtiff</depends>
337 <depends>wxjpeg</depends>
338 <depends>wxpng</depends>
a69544bf 339 <depends>wxexpat</depends>
15b44c69
VS
340 <depends>wxzlib</depends>
341 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
342 <depends>wxregex</depends>
343 </template>
c74dc163 344 <template id="wx_base_dll" template="wx_dll_b"
e83a52a2 345 template_append="wx_append_base_nomono">
3fe70739
VS
346 <depends>wxtiff</depends>
347 <depends>wxjpeg</depends>
348 <depends>wxpng</depends>
390c0cfb 349 <depends>wxexpat</depends>
c74dc163 350 <depends>wxzlib</depends>
3fe70739 351 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
c74dc163
VS
352 <depends>wxregex</depends>
353 </template>
c0608865 354
ddf98968
VS
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>