]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/common.bkl
fixed dll extension when crosscompiling for win32
[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
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="WXDEBUGFLAG">
46 <if cond="BUILD=='debug'">d</if>
47 </set>
48 <set var="WXUNICODEFLAG">
49 <if cond="UNICODE=='1'">u</if>
50 </set>
51 <set var="WXNAMESUFFIX">
52 $(WXUNICODEFLAG)$(WXDEBUGFLAG)
53 </set>
54
55 <set var="WXUNIVNAME">
56 <if cond="WXUNIV=='1'">univ</if>
57 </set>
58 <set var="WXUNIV_DEFINE">
59 <if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
60 </set>
61
cdc0282e
VS
62 <if cond="FORMAT=='autoconf'">
63 <set var="WXNAMEPREFIX">wx</set>
64 <set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
65 <set var="WXVERSIONTAG">-$(WXVER_MAJOR).$(WXVER_MINOR)</set>
66 </if>
67 <if cond="FORMAT!='autoconf'">
68 <set var="WXNAMEPREFIX">wx$(WXVER_MAJOR)$(WXVER_MINOR)</set>
69 <set var="WXNAMEPREFIXGUI">wx$(PORTNAME)$(WXUNIVNAME)$(WXVER_MAJOR)$(WXVER_MINOR)</set>
70 <set var="WXVERSIONTAG"></set>
71 </if>
ddf98968
VS
72
73 <set var="TOOLCHAIN_NAME">
74 $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-$(WXVER_MAJOR).$(WXVER_MINOR)
75 </set>
76
77
78 <!-- =============================================================== -->
79 <!-- Names of component libraries: -->
80 <!-- =============================================================== -->
81
e86e1522
VS
82 <set var="WXLIB_BASE">
83 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
84 </set>
ddf98968
VS
85 <set var="WXLIB_CORE">
86 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
87 </set>
fab9850d 88 <set var="WXLIB_HTML">
e86e1522 89 <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
fab9850d 90 </set>
ddf98968
VS
91
92 <set var="WXLIB_MONO">
93 <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
94 </set>
95
96
97 <!-- =============================================================== -->
98 <!-- Where to store built libraries: -->
99 <!-- =============================================================== -->
4843dc4c 100
ddf98968 101 <set var="LIBDIRNAME">
481290e2 102 <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
4843dc4c 103 <if cond="FORMAT!='autoconf'">$(TOP_SRCDIR)lib$(DIRSEP)$(COMPILER)</if>
ddf98968 104 </set>
4843dc4c
VS
105
106 <!-- =============================================================== -->
107 <!-- Templates for libs: -->
108 <!-- =============================================================== -->
cdc0282e
VS
109
110 <set var="DEBUGFLAG">
111 <if cond="BUILD=='debug'">on</if>
112 <if cond="BUILD=='release'">off</if>
113 </set>
114 <set var="OPTIMIZEFLAG">
546a7e42
VS
115 <if cond="BUILD=='debug'">off</if>
116 <if cond="BUILD=='release'">speed</if>
cdc0282e 117 </set>
4843dc4c
VS
118
119 <template id="anylib">
120 <depends cond="FORMAT!='autoconf' and BUILDING_LIB=='1'">setup.h</depends>
121 <dirname>$(LIBDIRNAME)</dirname>
122 <install-to>$(LIBDIR)</install-to>
cdc0282e
VS
123
124 <debug-info>$(DEBUGFLAG)</debug-info>
125 <optimize>$(OPTIMIZEFLAG)</optimize>
126 <threading>multi</threading>
4843dc4c
VS
127 </template>
128
82cb0280
VS
129 <template id="3rdparty_lib" template="anylib">
130 <libname>$(id)$(WXDEBUGFLAG)</libname>
131 </template>
132
ddf98968
VS
133
134 <!-- =============================================================== -->
135 <!-- 3rd party libs: -->
136 <!-- =============================================================== -->
137
138 <!-- 3rd party libraries: -->
139 <include file="regex.bkl"/>
140 <include file="zlib.bkl"/>
141 <include file="png.bkl"/>
142 <include file="jpeg.bkl"/>
143 <include file="tiff.bkl"/>
144 <include file="odbc.bkl"/>
145
146
147 <!-- =============================================================== -->
148 <!-- Templates for wxWindows libs: -->
149 <!-- =============================================================== -->
cdc0282e 150
ddf98968
VS
151 <template id="wx">
152 <set var="wxid">$(wxwin.mk_wxid(id))</set>
153 <define>__WX$(TOOLKIT)__</define>
154 <define>$(WXUNIV_DEFINE)</define>
4843dc4c 155 <include>$(TOP_SRCDIR)include</include>
cdc0282e 156 <lib-path>$(LIBDIRNAME)</lib-path>
4843dc4c
VS
157 <include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
158 <include>$(INC_TIFF)</include>
159 <include>$(INC_JPEG)</include>
160 <include>$(INC_PNG)</include>
161 <include>$(INC_ZLIB)</include>
162 <include>$(INC_ODBC)</include>
163 <include>$(INC_REGEX)</include>
ddf98968
VS
164 </template>
165
166 <template id="wx_append">
cbdf98e3 167 <ldlibs>$(EXTRALIBS)</ldlibs>
ddf98968 168 <!-- link against builtin 3rd party libs, if needed: -->
4843dc4c 169 <sys-lib>$(LIB_TIFF)</sys-lib>
ddf98968
VS
170 <sys-lib>$(LIB_JPEG)</sys-lib>
171 <sys-lib>$(LIB_PNG)</sys-lib>
172 <sys-lib>$(LIB_ZLIB)</sys-lib>
ddf98968
VS
173 <sys-lib>$(LIB_ODBC)</sys-lib>
174 <sys-lib>$(LIB_REGEX)</sys-lib>
175 </template>
176
4843dc4c 177 <template id="wx_lib_b" template="wx,anylib">
ddf98968 178 <set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
ddf98968 179 <libname>$(WXLIBNAME)</libname>
cdc0282e
VS
180 <precomp-headers>on</precomp-headers>
181 <precomp-headers-file>wxprec</precomp-headers-file>
ddf98968
VS
182 </template>
183
fab9850d 184 <template id="wx_dll_b" template="wx_lib_b">
ddf98968
VS
185 <set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
186 <dllname>$(WXDLLNAME)</dllname>
187 <version>$(WX_VERSION)</version>
188 <so_version>$(WXSOVERSION)</so_version>
189 <mac_version>$(WXMACVERSION)</mac_version>
190 </template>
c0608865 191
fab9850d
VS
192 <template id="wx_lib" template="wx_lib_b"/>
193 <template id="wx_dll" template="wx_dll_b" template_append="wx_append"/>
c0608865 194
ddf98968
VS
195 <!-- =============================================================== -->
196 <!-- Support for wxWindows samples and contrib: -->
197 <!-- =============================================================== -->
198
199 <!-- Link against one wxWin library. Value must be literal! -->
200 <define-tag name="wx-lib" rules="exe,dll">
201 <sys-lib>$(wxwin.libToLink(value))</sys-lib>
202 </define-tag>
203
204</makefile>