]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
Disable dynlib and dynamicloader for djgpp
[wxWidgets.git] / build / bakefiles / common.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
481290e2
VS
2<!-- $Id$ -->
3
ddf98968 4<makefile>
b6dc1b90 5
e06a4299 6 <requires version="0.1.7"/>
e2c10c59 7
ddf98968
VS
8 <!-- bakefile modules we need: -->
9 <using module="datafiles"/>
10
11 <!-- load python module with wxwindows helpers: -->
12 <using module="wxwin"/>
13
c8c1b0bf
DE
14 <!-- DFE: Add a platform meaning regular MacOS (not OS X) -->
15 <!-- FIXME: This will be handled in Bakefile but for now I wanted to
e2c10c59
WS
16 get my changes to the wx bakefiles in the tree but invisible to
17 windows toolkits and their config.xxx settings -->
18 <if cond="FORMAT=='autoconf'">
19 <option name="PLATFORM_MACOS"/>
20 </if>
21 <if cond="FORMAT!='autoconf'">
22 <set var="PLATFORM_MACOS">0</set>
23 </if>
c8c1b0bf 24
a986efd0
WS
25 <!-- FIXME: PalmOS is another candidate to bakefiles -->
26 <set var="PLATFORM_PALMOS">0</set>
27
ddf98968 28 <include file="config.bkl"/>
c79241a2
VS
29
30 <include file="plugins_deps.bkl"/>
e2c10c59 31
ddf98968 32 <!-- ================================================================== -->
77ffb593 33 <!-- wxWidgets version numbers: -->
ddf98968
VS
34 <!-- ================================================================== -->
35
36 <set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
37 <set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
38 <set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
ceec2216
RL
39 <set var="WX_RELEASE" make_var="1">
40 $(WXVER_MAJOR).$(WXVER_MINOR)
41 </set>
a1bf307a
RL
42 <set var="WX_RELEASE_NODOT" make_var="1">
43 $(WXVER_MAJOR)$(WXVER_MINOR)
44 </set>
45 <set var="WX_VERSION" make_var="1">
46 $(WX_RELEASE).$(WXVER_RELEASE)
47 </set>
48 <set var="WX_VERSION_NODOT" make_var="1">
49 $(WX_RELEASE_NODOT)$(WXVER_RELEASE)
50 </set>
ddf98968 51
bdc408c4
VS
52 <set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
53
54 <set var="WXSOVERSION">
55 <if cond="WX_STABLE_BRANCH=='1'">0.0.0</if>
56 <if cond="WX_STABLE_BRANCH=='0'">$(WXVER_RELEASE).0.0</if>
57 </set>
ddf98968 58 <set var="WXMACVERSION">$(WX_VERSION)</set>
bdc408c4 59 <set var="WXWIN32DLLVERSION">
a1bf307a
RL
60 <if cond="WX_STABLE_BRANCH=='1'">$(WX_RELEASE_NODOT)</if>
61 <if cond="WX_STABLE_BRANCH=='0'">$(WX_VERSION_NODOT)</if>
bdc408c4 62 </set>
e2c10c59
WS
63
64
ddf98968
VS
65 <!-- ================================================================== -->
66 <!-- Names of libraries and DLLs: -->
67 <!-- ================================================================== -->
68
69 <set var="PORTNAME">
70 <if cond="USE_GUI=='0'">base</if>
71 <if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
72 </set>
e2c10c59 73
64a2a46f
VS
74 <set var="WXBASEPORT">
75 <if cond="TOOLKIT=='MAC'">_carbon</if>
76 </set>
ddf98968
VS
77
78 <set var="COMPILERORGCC">
79 <if cond="isdefined('COMPILER')">$(COMPILER)</if>
80 <if cond="not isdefined('COMPILER')">gcc</if>
81 </set>
82 <set var="WXCOMPILER">
83 <if cond="PLATFORM_WIN32=='1'">_$(COMPILERORGCC)</if>
84 </set>
4fc5f509
VS
85
86 <set var="VENDORTAG">
cff5df9f
VS
87 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
88 <if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
4fc5f509
VS
89 </set>
90
ddf98968 91 <set var="WXDEBUGFLAG">
4f6e1dac
VS
92 <if cond="BUILD=='debug' and DEBUG_FLAG=='default'">d</if>
93 <if cond="DEBUG_FLAG=='1'">d</if>
ddf98968
VS
94 </set>
95 <set var="WXUNICODEFLAG">
af594eca
VS
96 <!-- WinCE is Unicode-only platform: -->
97 <if cond="UNICODE=='1' and FORMAT!='msevc4prj'">u</if>
ddf98968
VS
98 </set>
99 <set var="WXNAMESUFFIX">
ceec2216 100 $(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
ddf98968 101 </set>
e2c10c59 102
ddf98968
VS
103 <set var="WXUNIVNAME">
104 <if cond="WXUNIV=='1'">univ</if>
105 </set>
106 <set var="WXUNIV_DEFINE">
107 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
108 </set>
109
cdc0282e 110 <if cond="FORMAT=='autoconf'">
64a2a46f 111 <set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
cdc0282e 112 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
a1bf307a 113 <set var="WXVERSIONTAG">-$(WX_RELEASE)</set>
cdc0282e
VS
114 </if>
115 <if cond="FORMAT!='autoconf'">
64a2a46f 116 <set var="WXNAMEPREFIX">
a1bf307a 117 wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)
64a2a46f
VS
118 </set>
119 <set var="WXNAMEPREFIXGUI">
a1bf307a 120 wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set>
cdc0282e
VS
121 <set var="WXVERSIONTAG"></set>
122 </if>
4fc5f509 123 <set var="WXDLLNAMEPREFIX">
64a2a46f 124 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 125 wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
64a2a46f 126 </if>
4fc5f509
VS
127 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
128 </set>
129 <set var="WXDLLNAMEPREFIXGUI">
130 <if cond="PLATFORM_WIN32=='1'">
bdc408c4 131 wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
4fc5f509
VS
132 </if>
133 <if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
134 </set>
135 <set var="WXDLLVERSIONTAG">
136 <if cond="PLATFORM_WIN32=='1'"></if>
137 <if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
138 </set>
ddf98968 139
e2c10c59 140
ddf98968
VS
141 <!-- =============================================================== -->
142 <!-- Names of component libraries: -->
143 <!-- =============================================================== -->
144
e86e1522
VS
145 <set var="WXLIB_BASE">
146 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
147 </set>
7c4728f6
VS
148 <set var="WXLIB_NET">
149 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
150 </set>
61639efb
VZ
151 <set var="WXLIB_QA">
152 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('qa')))</if>
153 </set>
ddf98968
VS
154 <set var="WXLIB_CORE">
155 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
156 </set>
13cb46e0
VS
157 <set var="WXLIB_ADV">
158 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
159 </set>
2ae3b602
RN
160 <set var="WXLIB_MEDIA">
161 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('media')))</if>
162 </set>
fab9850d 163 <set var="WXLIB_HTML">
e86e1522 164 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 165 </set>
a69544bf
VS
166 <set var="WXLIB_XML">
167 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
168 </set>
a62d8849
WS
169 <set var="WXLIB_XRC">
170 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
171 </set>
bb41dcbe 172 <set var="WXLIB_ODBC">
395a1c56
VS
173 <if cond="MONOLITHIC=='0' and USE_ODBC=='1'">
174 $(mk.evalExpr(wxwin.mkLibName('odbc')))
175 </if>
bb41dcbe 176 </set>
45293562
VS
177 <set var="WXLIB_DBGRID">
178 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('dbgrid')))</if>
179 </set>
ddf98968
VS
180
181 <set var="WXLIB_MONO">
182 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
183 </set>
e2c10c59
WS
184
185
ddf98968 186 <!-- =============================================================== -->
cff5df9f 187 <!-- Where to store built libraries and objects: -->
ddf98968 188 <!-- =============================================================== -->
e2c10c59 189
af594eca
VS
190 <set var="DIR_SUFFIX_CPU">
191 <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
192 </set>
cff5df9f
VS
193
194 <if cond="FORMAT!='autoconf'">
195 <set var="WXDLLFLAG">
196 <if cond="SHARED=='1'">dll</if>
197 </set>
198 <set var="CFG_NAME_PART">
199 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
200 </set>
328f5196 201 <set var="OBJS" make_var="1">
af594eca
VS
202 <if cond="FORMAT!='cbuilderx'">
203 $(COMPILER)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
204 </if>
328f5196
VS
205 <!-- FIXME: waiting for removal after CBX has better ../ dirs
206 support -->
207 <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
208 </set>
209
cff5df9f
VS
210 <set var="BUILDDIR">$(OBJS)</set>
211 </if>
e2c10c59 212
46da6d06
WS
213 <set var="LIBTYPE_SUFFIX" make_var="1">
214 <if cond="FORMAT!='autoconf' and SHARED=='0'">lib</if>
215 <if cond="FORMAT!='autoconf' and SHARED=='1'">dll</if>
216 </set>
217
390c0cfb 218 <set var="LIBDIRNAME" make_var="1">
481290e2 219 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
46da6d06
WS
220 <if cond="FORMAT!='autoconf'">
221 $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
cff5df9f 222 </if>
ddf98968 223 </set>
e2c10c59 224
ee929bcf
VS
225 <if cond="FORMAT!='autoconf'">
226 <set var="SETUPHDIR" make_var="1">
227 $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
228 </set>
229 </if>
cff5df9f 230
e2c10c59
WS
231
232
4843dc4c
VS
233 <!-- =============================================================== -->
234 <!-- Templates for libs: -->
235 <!-- =============================================================== -->
cdc0282e 236
4f6e1dac
VS
237 <set var="DEBUGINFO">
238 <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
239 <if cond="DEBUG_INFO=='1'">on</if>
240 <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
241 <if cond="DEBUG_INFO=='0'">off</if>
242 </set>
243 <set var="DEBUGRUNTIME">
51c4bf88
VS
244 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if>
245 <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if>
4f6e1dac
VS
246 <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
247 <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
cdc0282e
VS
248 </set>
249 <set var="OPTIMIZEFLAG">
546a7e42
VS
250 <if cond="BUILD=='debug'">off</if>
251 <if cond="BUILD=='release'">speed</if>
cdc0282e 252 </set>
9833a21a
VS
253 <set var="EXCEPTIONSFLAG">
254 <if cond="USE_EXCEPTIONS=='1'">on</if>
255 <if cond="USE_EXCEPTIONS=='0'">off</if>
256 </set>
c2efd890
VZ
257 <set var="RTTIFLAG">
258 <if cond="USE_RTTI=='1'">on</if>
259 <if cond="USE_RTTI=='0'">off</if>
260 </set>
d1e5aa07
VS
261 <set var="THREADSFLAG">
262 <if cond="USE_THREADS=='1'">multi</if>
263 <if cond="USE_THREADS=='0'">single</if>
264 </set>
15b44c69 265
b7e4c668
VZ
266 <set var="RTTI_DEFINE">
267 <if cond="USE_RTTI=='0'">wxNO_RTTI</if>
268 </set>
269 <set var="EXCEPTIONS_DEFINE">
270 <if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if>
271 </set>
272 <set var="THREAD_DEFINE">
273 <if cond="USE_THREADS=='0'">wxNO_THREADS</if>
274 </set>
275
15b44c69 276 <set var="DEBUG_DEFINE">
4f6e1dac
VS
277 <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
278 <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
15b44c69 279 </set>
4435bd42
MB
280 <!-- does not cover all cases, but better than nothing -->
281 <set var="NO_VC_CRTDBG">
282 <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
283 <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
284 </set>
15b44c69 285 <set var="UNICODE_DEFINE">
ed4ccecd 286 <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
15b44c69 287 </set>
e2c10c59 288
5fae0f97
WS
289 <!-- fill for the specific case of the format/compiler -->
290 <set var="WIN32_WINNT">
291 <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
292 </set>
293
416f5bc8
VS
294 <set var="UNICOWS_LIB">
295 <if cond="MSLU=='1'">unicows</if>
296 </set>
5e3746dc 297
149cc218 298 <template id="common_settings">
4f6e1dac
VS
299 <debug-info>$(DEBUGINFO)</debug-info>
300 <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
5e3746dc 301 <optimize>$(OPTIMIZEFLAG)</optimize>
d1e5aa07 302 <threading>$(THREADSFLAG)</threading>
4b44ea2b 303 <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
c2efd890 304 <cxx-rtti>$(RTTIFLAG)</cxx-rtti>
9833a21a 305 <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
5e3746dc
VS
306 <if cond="FORMAT!='autoconf'">
307 <cppflags>$(EXTRACFLAGS)</cppflags>
308 </if>
4435bd42 309 <define>$(NO_VC_CRTDBG)</define>
5fae0f97 310 <define>$(WIN32_WINNT)</define>
5e3746dc 311 </template>
e2c10c59 312
4843dc4c 313 <template id="anylib">
4843dc4c
VS
314 <dirname>$(LIBDIRNAME)</dirname>
315 <install-to>$(LIBDIR)</install-to>
316 </template>
317
149cc218 318 <template id="3rdparty_lib" template="common_settings,anylib">
a1bf307a
RL
319 <if cond="FORMAT=='autoconf'">
320 <libname>$(id)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
321 </if>
322 <if cond="FORMAT!='autoconf'">
9c2d002b 323 <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
a1bf307a 324 </if>
52a5a009
VS
325 <!--
326 we want to install 3rd party libs system-wide only with static
77ffb593 327 version of wxWidgets; otherwise they are embedded in shared libs:
52a5a009
VS
328 -->
329 <install-if>SHARED=='0'</install-if>
af594eca 330 <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
82cb0280 331 </template>
e2c10c59
WS
332
333
cb9548d9 334 <!-- deal with the need to copy setup.h here: -->
82cb0280 335
af594eca
VS
336 <set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
337
cb9548d9 338 <define-tag name="msvc-headers" rules="dll,lib">
af594eca 339 <if cond="IS_MSVC_PRJ">
cb9548d9
VS
340 <msvc-project-files>
341 $(addPrefixToList('include\', wxwin.headersOnly(value)))
342 </msvc-project-files>
343 </if>
344 </define-tag>
345
346 <define-tag name="msvc-copy-setup-h" rules="dll,lib">
af594eca
VS
347 <if cond="FORMAT=='msevc4prj'">
348 <msvc-headers>wx/msw/wince/setup.h</msvc-headers>
349 <set var="vc_setup_h">wince\setup.h</set>
350 <set var="vc_setup_h_rule">wince_setup_h</set>
351 </if>
352 <if cond="FORMAT!='msevc4prj'">
cb9548d9 353 <msvc-headers>wx/msw/setup.h</msvc-headers>
af594eca
VS
354 <set var="vc_setup_h">setup.h</set>
355 <set var="vc_setup_h_rule">setup_h</set>
356 </if>
357 <if cond="IS_MSVC_PRJ">
358 <set var="_custom_build_files" append="1">
359 include\wx\msw\$(vc_setup_h)
cb9548d9 360 </set>
af594eca 361 <set var="_custom_build_include_wx_msw_$(vc_setup_h_rule)">
cb9548d9 362Creating $(SETUPHDIR)\wx\setup.h
af594eca 363InputPath=..\include\wx\msw\$(vc_setup_h)
cb9548d9
VS
364
365"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
366$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
367 </set>
368 </if>
369 </define-tag>
370
371 <template id="msvc_setup_h">
372 <msvc-copy-setup-h/>
373 </template>
ddf98968
VS
374
375 <!-- =============================================================== -->
376 <!-- 3rd party libs: -->
377 <!-- =============================================================== -->
e2c10c59 378
ddf98968
VS
379 <!-- 3rd party libraries: -->
380 <include file="regex.bkl"/>
381 <include file="zlib.bkl"/>
382 <include file="png.bkl"/>
383 <include file="jpeg.bkl"/>
384 <include file="tiff.bkl"/>
385 <include file="odbc.bkl"/>
a69544bf 386 <include file="expat.bkl"/>
ddf98968 387
e2c10c59 388
ddf98968 389 <!-- =============================================================== -->
77ffb593 390 <!-- Templates for wxWidgets libs: -->
ddf98968 391 <!-- =============================================================== -->
cdc0282e 392
2cc75628
VS
393 <!-- NB: in monolithic build, even wxBase-only must be linked against
394 GUI extralibs, otherwise there would be unresolved references.
395 The variables below are defined so that all libs are used
396 in monolithic build, but not in multilib one. -->
397 <set var="EXTRALIBS_FOR_BASE">
398 <if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_GUI)</if>
399 <if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
400 </set>
401 <set var="EXTRALIBS_FOR_GUI">
402 <if cond="MONOLITHIC=='1'"></if>
403 <if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
404 </set>
405
149cc218 406 <template id="wx" template="common_settings">
ddf98968
VS
407 <set var="wxid">$(wxwin.mk_wxid(id))</set>
408 <define>__WX$(TOOLKIT)__</define>
409 <define>$(WXUNIV_DEFINE)</define>
15b44c69 410 <define>$(DEBUG_DEFINE)</define>
b7e4c668
VZ
411 <define>$(EXCEPTIONS_DEFINE)</define>
412 <define>$(RTTI_DEFINE)</define>
413 <define>$(THREAD_DEFINE)</define>
15b44c69 414 <define>$(UNICODE_DEFINE)</define>
85ebb95c
VS
415 <!-- this include is added by configure, we need to put other
416 includes before it: -->
417 <include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
e2c10c59 418 <lib-path>$(LIBDIRNAME)</lib-path>
ee929bcf 419 <include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
432afc17 420 <warnings>max</warnings>
a0177486
WS
421 <cppflags-watcom>
422 -wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
423 -wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
424 -wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
425 -wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
426 </cppflags-watcom>
329a2be8 427 <cxxflags-mingw>
f8fbc92b 428 -Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends -->
329a2be8 429 </cxxflags-mingw>
ddf98968
VS
430 </template>
431
c74dc163 432 <!-- for both GUI and wxBase libs/samples: -->
e83a52a2 433 <template id="wx_append_base_nomono">
ddf98968 434 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 435 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
436 <sys-lib>$(LIB_JPEG)</sys-lib>
437 <sys-lib>$(LIB_PNG)</sys-lib>
438 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
439 <sys-lib>$(LIB_ODBC)</sys-lib>
440 <sys-lib>$(LIB_REGEX)</sys-lib>
a69544bf 441 <sys-lib>$(LIB_EXPAT)</sys-lib>
e2c10c59 442
2cc75628 443 <ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
15b44c69
VS
444
445 <!-- system libraries on windows: -->
446 <if cond="FORMAT!='autoconf'">
416f5bc8 447 <sys-lib>$(UNICOWS_LIB)</sys-lib>
328f5196 448 <if cond="FORMAT=='borland'">
cb8bbc13
VS
449 <sys-lib>ole2w32</sys-lib>
450 </if>
f9c4805a
VS
451 <if cond="FORMAT=='msevc4prj'">
452 <sys-lib>ole32</sys-lib>
453 <sys-lib>oleaut32</sys-lib>
454 <sys-lib>uuid</sys-lib>
455 <sys-lib>commctrl</sys-lib>
f9c4805a
VS
456 <sys-lib>winsock</sys-lib>
457 <sys-lib>wininet</sys-lib>
458 </if>
459 <if cond="FORMAT!='borland' and FORMAT!='msevc4prj'">
cb8bbc13
VS
460 <sys-lib>kernel32</sys-lib>
461 <sys-lib>user32</sys-lib>
462 <sys-lib>gdi32</sys-lib>
463 <sys-lib>comdlg32</sys-lib>
464 <sys-lib>winspool</sys-lib>
465 <sys-lib>winmm</sys-lib>
466 <sys-lib>shell32</sys-lib>
cb8bbc13 467 <sys-lib>comctl32</sys-lib>
cb8bbc13
VS
468 <sys-lib>ole32</sys-lib>
469 <sys-lib>oleaut32</sys-lib>
470 <sys-lib>uuid</sys-lib>
471 <sys-lib>rpcrt4</sys-lib>
472 <sys-lib>advapi32</sys-lib>
473 <sys-lib>wsock32</sys-lib>
15b44c69 474 </if>
57670219 475 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
3682ea7d
VS
476 <sys-lib>oleacc</sys-lib>
477 </if>
f9c4805a
VS
478 <if cond="FORMAT!='msevc4prj'">
479 <sys-lib>odbc32</sys-lib>
480 </if>
57670219 481 </if>
ddf98968
VS
482 </template>
483
82ca3afe 484
c74dc163 485 <!-- for GUI libs/samples: -->
e83a52a2 486 <template id="wx_append_nomono" template="wx_append_base_nomono">
2cc75628 487 <ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
c74dc163
VS
488 </template>
489
e83a52a2
VS
490
491 <template id="wx_append_base" template_append="wx_append_base_nomono">
492 <!-- Always link against the wxWin library in monolithic build: -->
493 <sys-lib>$(WXLIB_MONO)</sys-lib>
494 </template>
495 <template id="wx_append" template_append="wx_append_nomono">
496 <!-- Always link against the wxWin library in monolithic build: -->
497 <sys-lib>$(WXLIB_MONO)</sys-lib>
498 </template>
e2c10c59 499
e83a52a2 500
0469579d 501 <set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
e2c10c59 502
4843dc4c 503 <template id="wx_lib_b" template="wx,anylib">
ddf98968 504 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 505 <libname>$(WXLIBNAME)</libname>
cb8bbc13 506
0469579d 507 <if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
442253be 508 <if cond="FORMAT!='autoconf' and TOOLKIT in ['MSW','WINCE']">
0469579d
VS
509 <sources>$(WXTOPDIR)src/msw/dummy.cpp</sources>
510 <precomp-headers-gen>
511 $(WXTOPDIR)src/msw/dummy.cpp
512 </precomp-headers-gen>
513 </if>
a420c7ed 514 <precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location>
0469579d
VS
515 <precomp-headers-header>wx/wxprec.h</precomp-headers-header>
516 <precomp-headers>on</precomp-headers>
517 <precomp-headers-file>wxprec_$(id)</precomp-headers-file>
3fe70739 518 <precomp-headers-exclude>
3fe70739 519 src/common/extended.c
3fe70739 520 </precomp-headers-exclude>
cb8bbc13 521 </if>
e2c10c59 522
3a811096 523 <if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
82ca3afe
VS
524 <msvc-file-group>Common Sources:src/common/*</msvc-file-group>
525 <msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
526 <msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
527 <msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
528 <msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
529 <msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
82ca3afe
VS
530 <msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
531 <msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
532 <msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
533 <msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
cbba971f 534 <msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
82ca3afe 535 </if>
ddf98968 536 </template>
cb8bbc13 537
fab9850d 538 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
539 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
540 <dllname>$(WXDLLNAME)</dllname>
541 <version>$(WX_VERSION)</version>
542 <so_version>$(WXSOVERSION)</so_version>
543 <mac_version>$(WXMACVERSION)</mac_version>
d181c36e
VS
544
545 <!-- version info resources: -->
260c165f
VS
546 <if cond="FORMAT not in ['rpmspec','wx24dsp']"> <!-- FIXME: fix for bkl-0.1.7 only, remove the cond later -->
547 <res-define>WXDLLNAME=$(WXDLLNAME)</res-define>
09d350c0
MW
548 <res-include cond="FORMAT=='autoconf'">
549 $(TOP_SRCDIR)include
550 </res-include>
260c165f 551 </if>
102d46f3 552 <win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
ddf98968 553 </template>
c0608865 554
0bcf9597 555 <template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
3fe70739
VS
556 <depends>wxtiff</depends>
557 <depends>wxjpeg</depends>
558 <depends>wxpng</depends>
0bcf9597
WS
559 </template>
560
561 <template id="wx_3rdparty_dependencies"
562 template="wx_3rdparty_dependencies_gui">
390c0cfb 563 <depends>wxexpat</depends>
c74dc163 564 <depends>wxzlib</depends>
3fe70739 565 <depends cond="FORMAT=='autoconf'">wxodbc</depends>
c74dc163
VS
566 <depends>wxregex</depends>
567 </template>
ee929bcf 568
0bcf9597 569 <template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'">
ee929bcf
VS
570 <include>$(INC_TIFF)</include>
571 <include>$(INC_JPEG)</include>
572 <include>$(INC_PNG)</include>
0bcf9597
WS
573 </template>
574
575 <template id="wx_3rdparty_includes"
576 template="wx_3rdparty_includes_gui">
ee929bcf
VS
577 <include>$(INC_ZLIB)</include>
578 <include>$(INC_ODBC)</include>
579 <include>$(INC_REGEX)</include>
580 <include>$(INC_EXPAT)</include>
581 </template>
e2c10c59 582
9698d244
VS
583 <template id="wx_lib"
584 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
585 <template id="wx_base_lib"
586 template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
e2c10c59 587 <define>wxUSE_GUI=0</define>
15d93f1e
VS
588 </template>
589
ee929bcf
VS
590 <template id="wx_dll"
591 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 592 template_append="msvc_setup_h,wx_append_nomono"/>
ee929bcf
VS
593 <template id="wx_base_dll"
594 template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
9698d244 595 template_append="msvc_setup_h,wx_append_base_nomono">
e2c10c59 596 <define>wxUSE_GUI=0</define>
15d93f1e 597 </template>
e2c10c59 598
ae4ae157 599 <!-- =============================================================== -->
77ffb593 600 <!-- Templates for building wxWidgets plugins: -->
ae4ae157
VS
601 <!-- =============================================================== -->
602
ae4ae157 603 <if cond="WX_STABLE_BRANCH=='1'">
c79241a2 604 <set var="PLUGIN_VERSION0">
a1bf307a
RL
605 <if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
606 <if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
ae4ae157
VS
607 </set>
608 </if>
609 <if cond="WX_STABLE_BRANCH=='0'">
c79241a2 610 <set var="PLUGIN_VERSION0">
a1bf307a
RL
611 <if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
612 <if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
ae4ae157
VS
613 </set>
614 </if>
c79241a2
VS
615 <set var="PLUGVERDELIM">
616 <if cond="PLATFORM_UNIX=='1'">-</if>
617 <if cond="PLATFORM_UNIX=='0'"></if>
618 </set>
619 <set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
e2c10c59 620
c79241a2
VS
621 <set var="PLUGINSUFFIX">
622 <if cond="UNICODE=='0' and BUILD=='release'"></if>
314a6446
VS
623 <if cond="UNICODE=='0' and BUILD=='debug'">d</if>
624 <if cond="UNICODE=='1' and BUILD=='release'">u</if>
625 <if cond="UNICODE=='1' and BUILD=='debug'">ud</if>
c79241a2
VS
626 </set>
627
628 <set var="PLUGINS_INST_DIR" make_var="1">
629 $(LIBDIR)/wx/$(PLUGIN_VERSION0)
630 </set>
ae4ae157
VS
631
632 <define-rule name="wx-base-plugin" extends="module">
633 <template>
634 <dllname>
c79241a2 635 $(id)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
636 </dllname>
637 <define>WXUSINGDLL</define>
15d93f1e 638 <define>wxUSE_GUI=0</define>
c79241a2 639 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
640 </template>
641 </define-rule>
e2c10c59 642
ae4ae157
VS
643 <define-rule name="wx-gui-plugin" extends="module">
644 <template template="wx">
645 <dllname>
c79241a2 646 $(id)_$(PORTNAME)$(WXUNIVNAME)$(PLUGINSUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
ae4ae157
VS
647 </dllname>
648 <define>WXUSINGDLL</define>
c79241a2 649 <install-to>$(PLUGINS_INST_DIR)</install-to>
ae4ae157
VS
650 </template>
651 </define-rule>
e2c10c59 652
ddf98968 653 <!-- =============================================================== -->
77ffb593 654 <!-- Support for wxWidgets samples and contrib: -->
ddf98968
VS
655 <!-- =============================================================== -->
656
657 <!-- Link against one wxWin library. Value must be literal! -->
485a205e 658 <define-tag name="wx-lib" rules="exe,dll,module">
ddf98968 659 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
22cef566 660 <ldlibs>$(wxwin.extraLdflags(value))</ldlibs>
3a811096 661 <if cond="IS_MSVC_PRJ=='1' and MONOLITHIC=='0'">
dce0742b 662 <depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
7bd54b68 663 </if>
ddf98968
VS
664 </define-tag>
665
4bae0a94
VS
666
667 <!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
668 {top_srcdir} from configure, poor bakefile can't know that
669 and won't output top_srcdir = @top_srcdir@ line): -->
670 <set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
671
672
ddf98968 673</makefile>