]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
don't generate install commands, not needed
[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 63 <set var="WXDEBUGFLAG">
4f6e1dac
VS
64 <if cond="BUILD=='debug' and DEBUG_FLAG=='default'">d</if>
65 <if cond="DEBUG_FLAG=='1'">d</if>
ddf98968
VS
66 </set>
67 <set var="WXUNICODEFLAG">
68 <if cond="UNICODE=='1'">u</if>
69 </set>
70 <set var="WXNAMESUFFIX">
71 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
72 </set>
73
74 <set var="WXUNIVNAME">
75 <if cond="WXUNIV=='1'">univ</if>
76 </set>
77 <set var="WXUNIV_DEFINE">
78 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
79 </set>
80
cdc0282e 81 <if cond="FORMAT=='autoconf'">
64a2a46f 82 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
cdc0282e
VS
83 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
84 <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set>
85 </if>
86 <if cond="FORMAT!='autoconf'">
64a2a46f
VS
87 <set var="WXNAMEPREFIX">
88 wxbase$(WXBASEPORT)$(WXVER_MAJOR)$(WXVER_MINOR)
89 </set>
90 <set var="WXNAMEPREFIXGUI">
91 wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)</set>
cdc0282e
VS
92 <set var="WXVERSIONTAG"></set>
93 </if>
4fc5f509 94 <set var="WXDLLNAMEPREFIX">
64a2a46f 95 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 96 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
64a2a46f 97 </if>
4fc5f509
VS
98 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
99 </set>
100 <set var="WXDLLNAMEPREFIXGUI">
101 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 102 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
4fc5f509
VS
103 </if>
104 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
105 </set>
106 <set var="WXDLLVERSIONTAG">
107 <if cond="PLATFORM_WIN32=='1'"></if>
108 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
109 </set>
ddf98968 110
ddf98968
VS
111
112 <!-- =============================================================== -->
113 <!-- Names of component libraries: -->
114 <!-- =============================================================== -->
115
e86e1522
VS
116 <set var="WXLIB_BASE">
117 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
118 </set>
7c4728f6
VS
119 <set var="WXLIB_NET">
120 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
121 </set>
ddf98968
VS
122 <set var="WXLIB_CORE">
123 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
124 </set>
13cb46e0
VS
125 <set var="WXLIB_ADV">
126 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
127 </set>
fab9850d 128 <set var="WXLIB_HTML">
e86e1522 129 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 130 </set>
a69544bf
VS
131 <set var="WXLIB_XML">
132 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
133 </set>
bb41dcbe
VS
134 <set var="WXLIB_ODBC">
135 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('odbc')))</if>
136 </set>
45293562
VS
137 <set var="WXLIB_DBGRID">
138 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))</if>
139 </set>
ddf98968
VS
140
141 <set var="WXLIB_MONO">
142 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
143 </set>
144
145
146 <!-- =============================================================== -->
cff5df9f 147 <!-- Where to store built libraries and objects: -->
ddf98968 148 <!-- =============================================================== -->
4843dc4c 149
cff5df9f
VS
150
151 <if cond="FORMAT!='autoconf'">
152 <set var="WXDLLFLAG">
153 <if cond="SHARED=='1'">dll</if>
154 </set>
155 <set var="CFG_NAME_PART">
156 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
157 </set>
bdb03aa9 158 <set var="OBJS" make_var="1">$(COMPILER)_$(CFG_NAME_PART)</set>
cff5df9f
VS
159 <set var="BUILDDIR">$(OBJS)</set>
160 </if>
cff5df9f 161
390c0cfb 162 <set var="LIBDIRNAME" make_var="1">
481290e2 163 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
cff5df9f 164 <if cond="FORMAT!='autoconf'">
390c0cfb 165 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)_$(CFG_NAME_PART)
cff5df9f 166 </if>
ddf98968 167 </set>
cff5df9f 168
4843dc4c
VS
169
170 <!-- =============================================================== -->
171 <!-- Templates for libs: -->
172 <!-- =============================================================== -->
cdc0282e 173
4f6e1dac
VS
174 <set var="DEBUGINFO">
175 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
176 <if cond="DEBUG_INFO=='1'">on</if>
177 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
178 <if cond="DEBUG_INFO=='0'">off</if>
179 </set>
180 <set var="DEBUGRUNTIME">
181 <if cond="DEBUG_RUNTIME_LIBS=='default'">$(DEBUGINFO)</if>
182 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
183 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
cdc0282e
VS
184 </set>
185 <set var="OPTIMIZEFLAG">
546a7e42
VS
186 <if cond="BUILD=='debug'">off</if>
187 <if cond="BUILD=='release'">speed</if>
cdc0282e 188 </set>
15b44c69
VS
189
190 <set var="DEBUG_DEFINE">
4f6e1dac
VS
191 <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
192 <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
15b44c69
VS
193 </set>
194 <set var="UNICODE_DEFINE">
195 <if cond="FORMAT!='autoconf' and UNICODE=='1'">wxUSE_UNICODE=1</if>
196 </set>
416f5bc8
VS
197
198 <set var="UNICOWS_LIB">
199 <if cond="MSLU=='1'">unicows</if>
200 </set>
5e3746dc 201
149cc218 202 <template id="common_settings">
4f6e1dac
VS
203 <debug-info>$(DEBUGINFO)</debug-info>
204 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
5e3746dc
VS
205 <optimize>$(OPTIMIZEFLAG)</optimize>
206 <threading>multi</threading>
4b44ea2b 207 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
5e3746dc
VS
208 <if cond="FORMAT!='autoconf'">
209 <cppflags>$(EXTRACFLAGS)</cppflags>
210 </if>
211 </template>
4843dc4c
VS
212
213 <template id="anylib">
4843dc4c
VS
214 <dirname>$(LIBDIRNAME)</dirname>
215 <install-to>$(LIBDIR)</install-to>
216 </template>
217
149cc218 218 <template id="3rdparty_lib" template="common_settings,anylib">
ea66c762 219 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
82cb0280
VS
220 </template>
221
ddf98968
VS
222
223 <!-- =============================================================== -->
224 <!-- 3rd party libs: -->
225 <!-- =============================================================== -->
226
227 <!-- 3rd party libraries: -->
228 <include file="regex.bkl"/>
229 <include file="zlib.bkl"/>
230 <include file="png.bkl"/>
231 <include file="jpeg.bkl"/>
232 <include file="tiff.bkl"/>
233 <include file="odbc.bkl"/>
a69544bf 234 <include file="expat.bkl"/>
ddf98968
VS
235
236
237 <!-- =============================================================== -->
238 <!-- Templates for wxWindows libs: -->
239 <!-- =============================================================== -->
cdc0282e 240
149cc218 241 <template id="wx" template="common_settings">
ddf98968
VS
242 <set var="wxid">$(wxwin.mk_wxid(id))</set>
243 <define>__WX$(TOOLKIT)__</define>
244 <define>$(WXUNIV_DEFINE)</define>
15b44c69
VS
245 <define>$(DEBUG_DEFINE)</define>
246 <define>$(UNICODE_DEFINE)</define>
4843dc4c 247 <include>$(TOP_SRCDIR)include</include>
cdc0282e 248 <lib-path>$(LIBDIRNAME)</lib-path>
4843dc4c
VS
249 <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
250 <include>$(INC_TIFF)</include>
251 <include>$(INC_JPEG)</include>
252 <include>$(INC_PNG)</include>
253 <include>$(INC_ZLIB)</include>
254 <include>$(INC_ODBC)</include>
255 <include>$(INC_REGEX)</include>
e3b108b8 256 <include>$(INC_EXPAT)</include>
ddf98968
VS
257 </template>
258
c74dc163 259 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 260 <template id="wx_append_base_nomono">
ddf98968 261 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 262 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
263 <sys-lib>$(LIB_JPEG)</sys-lib>
264 <sys-lib>$(LIB_PNG)</sys-lib>
265 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
266 <sys-lib>$(LIB_ODBC)</sys-lib>
267 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 268 <sys-lib>$(LIB_EXPAT)</sys-lib>
15b44c69
VS
269
270 <ldlibs>$(EXTRALIBS)</ldlibs>
271
272 <!-- system libraries on windows: -->
273 <if cond="FORMAT!='autoconf'">
416f5bc8 274 <sys-lib>$(UNICOWS_LIB)</sys-lib>
15b44c69
VS
275 <if cond="COMPILER=='bcc'">
276 <sys-lib>import32</sys-lib>
cb8bbc13
VS
277 <sys-lib>ole2w32</sys-lib>
278 </if>
279 <if cond="COMPILER!='bcc'">
280 <sys-lib>kernel32</sys-lib>
281 <sys-lib>user32</sys-lib>
282 <sys-lib>gdi32</sys-lib>
283 <sys-lib>comdlg32</sys-lib>
284 <sys-lib>winspool</sys-lib>
285 <sys-lib>winmm</sys-lib>
286 <sys-lib>shell32</sys-lib>
cb8bbc13
VS
287 <sys-lib>comctl32</sys-lib>
288 <sys-lib>odbc32</sys-lib>
289 <sys-lib>ole32</sys-lib>
290 <sys-lib>oleaut32</sys-lib>
291 <sys-lib>uuid</sys-lib>
292 <sys-lib>rpcrt4</sys-lib>
293 <sys-lib>advapi32</sys-lib>
294 <sys-lib>wsock32</sys-lib>
15b44c69
VS
295 </if>
296 </if>
ddf98968
VS
297 </template>
298
390c0cfb
VS
299 <define-tag name="msvc-headers" rules="dll,lib">
300 <if cond="FORMAT=='msvc6prj'">
301 <msvc-project-files>
302 $(addPrefixToList('include\', wxwin.headersOnly(value)))
303 </msvc-project-files>
304 </if>
305 </define-tag>
74e73714
VS
306
307 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
308 <if cond="FORMAT=='msvc6prj'">
309 <msvc-headers>wx/msw/setup.h</msvc-headers>
310 <set var="__custom_build_files" append="1">
311 include\wx\msw\setup.h
312 </set>
313 <set var="__custom_build_include_wx_msw_setup_h">
314Creating $(LIBDIRNAME)\wx\setup.h
315InputPath=..\include\wx\msw\setup.h
316
317"$(LIBDIRNAME)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
318$(TAB)copy "$(DOLLAR)(InputPath)" $(LIBDIRNAME)\wx\setup.h
319 </set>
320 </if>
321 </define-tag>
390c0cfb 322
82ca3afe 323
c74dc163 324 <!-- for GUI libs/samples: -->
e83a52a2 325 <template id="wx_append_nomono" template="wx_append_base_nomono">
c74dc163
VS
326 <ldlibs>$(EXTRALIBS_GUI)</ldlibs>
327 </template>
328
e83a52a2
VS
329
330 <template id="wx_append_base" template_append="wx_append_base_nomono">
331 <!-- Always link against the wxWin library in monolithic build: -->
332 <sys-lib>$(WXLIB_MONO)</sys-lib>
333 </template>
334 <template id="wx_append" template_append="wx_append_nomono">
335 <!-- Always link against the wxWin library in monolithic build: -->
336 <sys-lib>$(WXLIB_MONO)</sys-lib>
337 </template>
338
339
0469579d
VS
340 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
341
4843dc4c 342 <template id="wx_lib_b" template="wx,anylib">
ddf98968 343 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 344 <libname>$(WXLIBNAME)</libname>
cb8bbc13 345
0469579d
VS
346 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
347 <if cond="FORMAT!='autoconf'">
348 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
349 <precomp-headers-gen>
350 $(WXTOPDIR)src/msw/dummy.cpp
351 </precomp-headers-gen>
352 </if>
353 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
354 <precomp-headers>on</precomp-headers>
355 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
3fe70739
VS
356 <precomp-headers-exclude>
357 src/common/unzip.c
358 src/common/extended.c
359 src/msw/gsocket.c
360 src/msw/gsockmsw.c
361 </precomp-headers-exclude>
cb8bbc13 362 </if>
82ca3afe
VS
363
364 <if cond="FORMAT=='msvc6prj' and BUILDING_LIB=='1'">
365 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
366 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
367 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
368 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
369 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
370 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
82ca3afe
VS
371 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
372 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
373 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
374 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
cbba971f 375 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
82ca3afe 376 </if>
ddf98968 377 </template>
cb8bbc13 378
fab9850d 379 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
380 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
381 <dllname>$(WXDLLNAME)</dllname>
382 <version>$(WX_VERSION)</version>
383 <so_version>$(WXSOVERSION)</so_version>
384 <mac_version>$(WXMACVERSION)</mac_version>
385 </template>
c0608865 386
5c802b3d 387 <template id="wx_3rdparty_dependencies">
3fe70739
VS
388 <depends>wxtiff</depends>
389 <depends>wxjpeg</depends>
390 <depends>wxpng</depends>
390c0cfb 391 <depends>wxexpat</depends>
c74dc163 392 <depends>wxzlib</depends>
3fe70739 393 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
c74dc163
VS
394 <depends>wxregex</depends>
395 </template>
c0608865 396
5c802b3d 397 <template id="wx_lib" template="wx_lib_b,wx_3rdparty_dependencies"/>
15d93f1e
VS
398 <template id="wx_base_lib" template="wx_lib_b,wx_3rdparty_dependencies">
399 <define>wxUSE_GUI=0</define>
400 </template>
401
5c802b3d
VS
402 <template id="wx_dll" template="wx_dll_b,wx_3rdparty_dependencies"
403 template_append="wx_append_nomono"/>
404 <template id="wx_base_dll" template="wx_dll_b,wx_3rdparty_dependencies"
15d93f1e
VS
405 template_append="wx_append_base_nomono">
406 <define>wxUSE_GUI=0</define>
407 </template>
ae4ae157
VS
408
409 <!-- =============================================================== -->
410 <!-- Templates for building wxWindows plugins: -->
411 <!-- =============================================================== -->
412
ae4ae157
VS
413 <if cond="WX_STABLE_BRANCH=='1'">
414 <set var="PLUGIN_VERSION">
415 <if cond="PLATFORM_UNIX=='1'">
416 -$(WXVER_MAJOR).$(WXVER_MINOR)
417 </if>
418 <if cond="PLATFORM_UNIX=='0'">
419 $(WXVER_MAJOR)$(WXVER_MINOR)
420 </if>
421 </set>
422 </if>
423 <if cond="WX_STABLE_BRANCH=='0'">
424 <set var="PLUGIN_VERSION">
425 <if cond="PLATFORM_UNIX=='1'">
426 -$(WXVER_MAJOR).$(WXVER_MINOR).$(WXVER_RELEASE)
427 </if>
428 <if cond="PLATFORM_UNIX=='0'">
429 $(WXVER_MAJOR)$(WXVER_MINOR)$(WXVER_RELEASE)
430 </if>
431 </set>
432 </if>
433
434 <define-rule name="wx-base-plugin" extends="module">
435 <template>
436 <dllname>
437 $(id)$(addPrefixIfNotEmpty('_',WXNAMESUFFIX))$(PLUGIN_VERSION)
438 </dllname>
439 <define>WXUSINGDLL</define>
15d93f1e 440 <define>wxUSE_GUI=0</define>
ae4ae157
VS
441 </template>
442 </define-rule>
443
444 <define-rule name="wx-gui-plugin" extends="module">
445 <template template="wx">
446 <dllname>
447 $(id)_$(PORTNAME)$(WXUNIVNAME)$(WXNAMESUFFIX)$(PLUGIN_VERSION)
448 </dllname>
449 <define>WXUSINGDLL</define>
450 </template>
451 </define-rule>
5c802b3d 452
ddf98968
VS
453 <!-- =============================================================== -->
454 <!-- Support for wxWindows samples and contrib: -->
455 <!-- =============================================================== -->
456
457 <!-- Link against one wxWin library. Value must be literal! -->
485a205e 458 <define-tag name="wx-lib" rules="exe,dll,module">
ddf98968
VS
459 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
460 </define-tag>
461
462</makefile>