]>
Commit | Line | Data |
---|---|---|
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 | ||
15 | FIXME: 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 | ||
438eb650 WS |
45 | <!-- this is a temporary variable until there is non general --> |
46 | <!-- function in bakefiles for returning native markup for --> | |
47 | <!-- reading envrionment variables --> | |
48 | <set var="ENV_VAR"> | |
49 | <if cond="FORMAT=='watcom'">%</if> | |
50 | <if cond="FORMAT!='watcom'"></if> | |
51 | </set> | |
52 | ||
83c7f6a7 VS |
53 | <!-- The directory where wxWidgets is installed: --> |
54 | <option name="WX_DIR" category="path"> | |
438eb650 | 55 | <default-value>$(DOLLAR)($(ENV_VAR)WXWIN)</default-value> |
83c7f6a7 VS |
56 | <description> |
57 | The directory where wxWidgets library is installed | |
58 | </description> | |
59 | </option> | |
60 | ||
61 | <!-- This is a standard option that determines --> | |
62 | <!-- whether the user wants to build this library as --> | |
63 | <!-- a dll or as a static library. --> | |
64 | <option name="WX_SHARED"> | |
65 | <values>0,1</values> | |
66 | <values-description>,DLL</values-description> | |
67 | <default-value>0</default-value> | |
68 | <description> | |
69 | Use DLL build of wx library to use? | |
70 | </description> | |
71 | </option> | |
72 | ||
73 | <!-- Configuration for building the bakefile with --> | |
74 | <!-- unicode strings or not (unicode or ansi). --> | |
75 | <option name="WX_UNICODE"> | |
76 | <values>0,1</values> | |
77 | <values-description>,Unicode</values-description> | |
78 | <default-value>0</default-value> | |
79 | <description> | |
80 | Compile Unicode build of wxWidgets? | |
81 | </description> | |
82 | </option> | |
83 | ||
84 | <option name="WX_DEBUG"> | |
85 | <values>0,1</values> | |
86 | <values-description>,Debug</values-description> | |
87 | <default-value>1</default-value> | |
88 | <description> | |
89 | Use debug build of wxWidgets (define __WXDEBUG__)? | |
90 | </description> | |
91 | </option> | |
92 | ||
93 | <option name="WX_VERSION"> | |
94 | <default-value>25</default-value> | |
95 | <description> | |
96 | Version of the wx library to build against. | |
97 | </description> | |
98 | </option> | |
99 | ||
100 | <!-- HELPER VARIABLES --> | |
101 | <!-- --> | |
102 | ||
103 | ||
104 | <!-- The unicode define we want. By default bakefile --> | |
105 | <!-- makes variables an empty string, so if unicode --> | |
106 | <!-- is not defined $(UNICODE_DEFINE) would expand --> | |
107 | <!-- to nothing (literally). --> | |
108 | <set var="WXUNICODE_DEFINE"> | |
109 | <if cond="WX_UNICODE=='1'">_UNICODE</if> | |
110 | </set> | |
111 | ||
112 | <!-- The debug define we need with win32 compilers --> | |
113 | <!-- (on Linux, the wx-config program is used). --> | |
114 | <set var="WXDEBUG_DEFINE"> | |
115 | <if cond="WX_DEBUG=='1'">__WXDEBUG__</if> | |
116 | </set> | |
117 | ||
118 | <!-- These are handy ways of dealing with the --> | |
119 | <!-- extensions in the library names of the --> | |
120 | <!-- wxWindows library. --> | |
121 | <set var="WXLIBPOSTFIX"> | |
122 | <if cond="WX_DEBUG=='1' and WX_UNICODE=='1'">ud</if> | |
123 | <if cond="WX_DEBUG=='1' and WX_UNICODE=='0'">d</if> | |
124 | <if cond="WX_DEBUG=='0' and WX_UNICODE=='1'">u</if> | |
125 | </set> | |
6cab6476 VS |
126 | <set var="WX3RDPARTLIBPOSTFIX"> |
127 | <if cond="WX_DEBUG=='1'">d</if> | |
83c7f6a7 VS |
128 | </set> |
129 | ||
130 | <set var="WXLIBPATH"> | |
131 | <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_lib</if> | |
132 | <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_dll</if> | |
133 | </set> | |
134 | ||
135 | <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set> | |
136 | ||
137 | ||
138 | <!-- WX TEMPLATE --> | |
139 | <!-- --> | |
140 | <!-- --> | |
141 | <!-- While not required, templates make your --> | |
142 | <!-- bakefiles much more readable. Templates, in --> | |
143 | <!-- essence, are abstract classes like c++. --> | |
144 | <!-- --> | |
145 | <!-- Your build targets "inherit" the template, --> | |
146 | <!-- along with the info associated with the template --> | |
147 | ||
148 | <!-- --> | |
149 | <!-- wxWidgets LIBRARY/APP TEMPLATE --> | |
150 | <!-- --> | |
151 | <!-- The "base class" of all our build targets --> | |
152 | <!-- This links with the appropriate native --> | |
153 | <!-- libraries required by the platform, the libaries --> | |
154 | <!-- we want for our stuff, and the wxWindows libs. --> | |
155 | ||
156 | ||
157 | ||
158 | <!-- this tag is used to include wx libraries: --> | |
159 | <define-tag name="wx-lib" rules="exe,dll,module"> | |
160 | <if cond="value=='base'"> | |
161 | <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</sys-lib> | |
162 | </if> | |
163 | <if cond="value in ['net','xml']"> | |
164 | <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib> | |
165 | </if> | |
166 | <if cond="value not in ['base','net','xml']"> | |
167 | <sys-lib>wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib> | |
168 | </if> | |
169 | </define-tag> | |
170 | ||
171 | <!-- just a placeholder to mark the place where <wx-lib> will be placed, | |
172 | thanks to the order precedence declaration below it: --> | |
173 | <define-tag name="__wx-libs-point" rules="exe,dll,module"/> | |
174 | <tag-info name="wx-lib" | |
175 | position="before:__wx-libs-point"/> | |
176 | ||
177 | ||
c07e76fa VS |
178 | <!-- template for static wx libraries: --> |
179 | <template id="wx-lib"> | |
83c7f6a7 VS |
180 | <!-- MISCELLANEOUS --> |
181 | <if cond="FORMAT=='mingw'"> | |
182 | <define>HAVE_W32API_H</define> | |
183 | <ldflags>-mthreads</ldflags> | |
184 | </if> | |
185 | ||
186 | <define>$(WXUNICODE_DEFINE)</define> | |
187 | <define>$(WXDEBUG_DEFINE)</define> | |
188 | <define>__WXMSW__</define> | |
189 | ||
190 | <include>$(WX_DIR)$(WXLIBINCLUDE)</include> | |
191 | <include>$(WX_DIR)/include</include> | |
c07e76fa VS |
192 | </template> |
193 | ||
194 | ||
195 | <!-- template for wx executables/dlls: --> | |
196 | <template id="wx" template="wx-lib"> | |
83c7f6a7 VS |
197 | <lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path> |
198 | ||
199 | <!-- wx libs must come before 3rd party and sys libs, this is | |
200 | the place where the hack explained above is carried on: --> | |
201 | <__wx-libs-point/> | |
202 | ||
203 | <!-- wx 3rd party libs, always use them: --> | |
6cab6476 VS |
204 | <sys-lib>wxtiff$(WX3RDPARTLIBPOSTFIX)</sys-lib> |
205 | <sys-lib>wxjpeg$(WX3RDPARTLIBPOSTFIX)</sys-lib> | |
206 | <sys-lib>wxpng$(WX3RDPARTLIBPOSTFIX)</sys-lib> | |
207 | <sys-lib>wxzlib$(WX3RDPARTLIBPOSTFIX)</sys-lib> | |
208 | <!-- For regex we won't use the WX3RDPARTLIBPOSTIX postfix: | |
83c7f6a7 VS |
209 | unliked tiff, jpeg, png, zlib, expat, when building |
210 | in Unicode mode, the "u" suffix is appended to regex --> | |
211 | <sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib> | |
6cab6476 | 212 | <sys-lib>wxexpat$(WX3RDPARTLIBPOSTFIX)</sys-lib> |
83c7f6a7 VS |
213 | |
214 | <!-- link-in system libs that wx depends on: --> | |
215 | <!-- If on borland, we don't need to do much --> | |
216 | <if cond="FORMAT=='borland'"> | |
217 | <sys-lib>ole2w32</sys-lib> | |
218 | </if> | |
219 | ||
220 | <!-- Non-borland, on the other hand... --> | |
221 | <if cond="FORMAT!='borland'"> | |
222 | <sys-lib>kernel32</sys-lib> | |
223 | <sys-lib>user32</sys-lib> | |
224 | <sys-lib>gdi32</sys-lib> | |
225 | <sys-lib>comdlg32</sys-lib> | |
226 | <sys-lib>winspool</sys-lib> | |
227 | <sys-lib>winmm</sys-lib> | |
228 | <sys-lib>shell32</sys-lib> | |
229 | <sys-lib>comctl32</sys-lib> | |
230 | <sys-lib>ole32</sys-lib> | |
231 | <sys-lib>oleaut32</sys-lib> | |
232 | <sys-lib>uuid</sys-lib> | |
233 | <sys-lib>rpcrt4</sys-lib> | |
234 | <sys-lib>advapi32</sys-lib> | |
235 | <sys-lib>wsock32</sys-lib> | |
236 | <sys-lib>odbc32</sys-lib> | |
237 | </if> | |
238 | ||
239 | <!-- Libs common to both borland and MSVC --> | |
240 | <if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'"> | |
241 | <sys-lib>oleacc</sys-lib> | |
242 | </if> | |
243 | </template> | |
244 | ||
245 | </makefile> |