]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/wxpresets/presets/wx_win32.bkl
DEBUGREPORT
[wxWidgets.git] / build / bakefiles / wxpresets / presets / wx_win32.bkl
CommitLineData
83c7f6a7
VS
1<?xml version="1.0" ?>
2<!-- $Id$ -->
3
4<!-- Original source: http://wiki.wxwidgets.org/wiki.pl?Bakefile -->
5<!-- Modified by: Francesco Montorsi <frm@users.sourceforge.net> -->
6<!-- Vaclav Slavik <vslavik@fastmail.fm> to better fit
7 into Bakefile's presets -->
8<!-- Creation date: 6/9/2004 -->
9<!-- Last revision: 22/1/2005 off-CVS -->
10<!-- $Id$ -->
11
12
13<!--
14
15FIXME: this template has (at least) the following bugs:
16
17 * it's MSW-only, the port is assumed to be wxMSW unconditionally
18
19 * multiple wx configurations (CFG variable set when building the
20 library) are not supported
21
22-->
23
24<!-- makefile tag signifies the beginning of the bakefile -->
25<makefile>
26
27 <requires version="0.1.5"/>
28
29 <!-- OPTIONS -->
30 <!-- -->
31 <!-- These are essentially the configurations you -->
32 <!-- want in bakefile. -->
33 <!-- -->
34 <!-- In MSVC these are the different build -->
35 <!-- configurations you can have (in the build menu), -->
36 <!-- and in autoconf is enabled with enable-xxx=xx. -->
37 <!-- For other compilers a seperate configuration -->
38 <!-- file is created (such as config.gcc on gcc) -->
39 <!-- which has several options a user can modify. -->
40 <!-- -->
41 <!-- Note that the above only happens if an option -->
42 <!-- is not constant, i.e. if it cannot be determined -->
43 <!-- by bakefile itself. -->
44
45 <!-- The directory where wxWidgets is installed: -->
46 <option name="WX_DIR" category="path">
47 <default-value>$(DOLLAR)(WXWIN)</default-value>
48 <description>
49 The directory where wxWidgets library is installed
50 </description>
51 </option>
52
53 <!-- This is a standard option that determines -->
54 <!-- whether the user wants to build this library as -->
55 <!-- a dll or as a static library. -->
56 <option name="WX_SHARED">
57 <values>0,1</values>
58 <values-description>,DLL</values-description>
59 <default-value>0</default-value>
60 <description>
61 Use DLL build of wx library to use?
62 </description>
63 </option>
64
65 <!-- Configuration for building the bakefile with -->
66 <!-- unicode strings or not (unicode or ansi). -->
67 <option name="WX_UNICODE">
68 <values>0,1</values>
69 <values-description>,Unicode</values-description>
70 <default-value>0</default-value>
71 <description>
72 Compile Unicode build of wxWidgets?
73 </description>
74 </option>
75
76 <option name="WX_DEBUG">
77 <values>0,1</values>
78 <values-description>,Debug</values-description>
79 <default-value>1</default-value>
80 <description>
81 Use debug build of wxWidgets (define __WXDEBUG__)?
82 </description>
83 </option>
84
85 <option name="WX_VERSION">
86 <default-value>25</default-value>
87 <description>
88 Version of the wx library to build against.
89 </description>
90 </option>
91
92 <!-- HELPER VARIABLES -->
93 <!-- -->
94
95
96 <!-- The unicode define we want. By default bakefile -->
97 <!-- makes variables an empty string, so if unicode -->
98 <!-- is not defined $(UNICODE_DEFINE) would expand -->
99 <!-- to nothing (literally). -->
100 <set var="WXUNICODE_DEFINE">
101 <if cond="WX_UNICODE=='1'">_UNICODE</if>
102 </set>
103
104 <!-- The debug define we need with win32 compilers -->
105 <!-- (on Linux, the wx-config program is used). -->
106 <set var="WXDEBUG_DEFINE">
107 <if cond="WX_DEBUG=='1'">__WXDEBUG__</if>
108 </set>
109
110 <!-- These are handy ways of dealing with the -->
111 <!-- extensions in the library names of the -->
112 <!-- wxWindows library. -->
113 <set var="WXLIBPOSTFIX">
114 <if cond="WX_DEBUG=='1' and WX_UNICODE=='1'">ud</if>
115 <if cond="WX_DEBUG=='1' and WX_UNICODE=='0'">d</if>
116 <if cond="WX_DEBUG=='0' and WX_UNICODE=='1'">u</if>
117 </set>
6cab6476
VS
118 <set var="WX3RDPARTLIBPOSTFIX">
119 <if cond="WX_DEBUG=='1'">d</if>
83c7f6a7
VS
120 </set>
121
122 <set var="WXLIBPATH">
123 <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_lib</if>
124 <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_dll</if>
125 </set>
126
127 <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set>
128
129
130 <!-- WX TEMPLATE -->
131 <!-- -->
132 <!-- -->
133 <!-- While not required, templates make your -->
134 <!-- bakefiles much more readable. Templates, in -->
135 <!-- essence, are abstract classes like c++. -->
136 <!-- -->
137 <!-- Your build targets "inherit" the template, -->
138 <!-- along with the info associated with the template -->
139
140 <!-- -->
141 <!-- wxWidgets LIBRARY/APP TEMPLATE -->
142 <!-- -->
143 <!-- The "base class" of all our build targets -->
144 <!-- This links with the appropriate native -->
145 <!-- libraries required by the platform, the libaries -->
146 <!-- we want for our stuff, and the wxWindows libs. -->
147
148
149
150 <!-- this tag is used to include wx libraries: -->
151 <define-tag name="wx-lib" rules="exe,dll,module">
152 <if cond="value=='base'">
153 <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</sys-lib>
154 </if>
155 <if cond="value in ['net','xml']">
156 <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
157 </if>
158 <if cond="value not in ['base','net','xml']">
159 <sys-lib>wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
160 </if>
161 </define-tag>
162
163 <!-- just a placeholder to mark the place where <wx-lib> will be placed,
164 thanks to the order precedence declaration below it: -->
165 <define-tag name="__wx-libs-point" rules="exe,dll,module"/>
166 <tag-info name="wx-lib"
167 position="before:__wx-libs-point"/>
168
169
c07e76fa
VS
170 <!-- template for static wx libraries: -->
171 <template id="wx-lib">
83c7f6a7
VS
172 <!-- MISCELLANEOUS -->
173 <if cond="FORMAT=='mingw'">
174 <define>HAVE_W32API_H</define>
175 <ldflags>-mthreads</ldflags>
176 </if>
177
178 <define>$(WXUNICODE_DEFINE)</define>
179 <define>$(WXDEBUG_DEFINE)</define>
180 <define>__WXMSW__</define>
181
182 <include>$(WX_DIR)$(WXLIBINCLUDE)</include>
183 <include>$(WX_DIR)/include</include>
c07e76fa
VS
184 </template>
185
186
187 <!-- template for wx executables/dlls: -->
188 <template id="wx" template="wx-lib">
83c7f6a7
VS
189 <lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>
190
191 <!-- wx libs must come before 3rd party and sys libs, this is
192 the place where the hack explained above is carried on: -->
193 <__wx-libs-point/>
194
195 <!-- wx 3rd party libs, always use them: -->
6cab6476
VS
196 <sys-lib>wxtiff$(WX3RDPARTLIBPOSTFIX)</sys-lib>
197 <sys-lib>wxjpeg$(WX3RDPARTLIBPOSTFIX)</sys-lib>
198 <sys-lib>wxpng$(WX3RDPARTLIBPOSTFIX)</sys-lib>
199 <sys-lib>wxzlib$(WX3RDPARTLIBPOSTFIX)</sys-lib>
200 <!-- For regex we won't use the WX3RDPARTLIBPOSTIX postfix:
83c7f6a7
VS
201 unliked tiff, jpeg, png, zlib, expat, when building
202 in Unicode mode, the "u" suffix is appended to regex -->
203 <sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib>
6cab6476 204 <sys-lib>wxexpat$(WX3RDPARTLIBPOSTFIX)</sys-lib>
83c7f6a7
VS
205
206 <!-- link-in system libs that wx depends on: -->
207 <!-- If on borland, we don't need to do much -->
208 <if cond="FORMAT=='borland'">
209 <sys-lib>ole2w32</sys-lib>
210 </if>
211
212 <!-- Non-borland, on the other hand... -->
213 <if cond="FORMAT!='borland'">
214 <sys-lib>kernel32</sys-lib>
215 <sys-lib>user32</sys-lib>
216 <sys-lib>gdi32</sys-lib>
217 <sys-lib>comdlg32</sys-lib>
218 <sys-lib>winspool</sys-lib>
219 <sys-lib>winmm</sys-lib>
220 <sys-lib>shell32</sys-lib>
221 <sys-lib>comctl32</sys-lib>
222 <sys-lib>ole32</sys-lib>
223 <sys-lib>oleaut32</sys-lib>
224 <sys-lib>uuid</sys-lib>
225 <sys-lib>rpcrt4</sys-lib>
226 <sys-lib>advapi32</sys-lib>
227 <sys-lib>wsock32</sys-lib>
228 <sys-lib>odbc32</sys-lib>
229 </if>
230
231 <!-- Libs common to both borland and MSVC -->
232 <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
233 <sys-lib>oleacc</sys-lib>
234 </if>
235 </template>
236
237</makefile>