]> git.saurik.com Git - wxWidgets.git/blame - build/bakefiles/wx.bkl
Fixed capitalisation
[wxWidgets.git] / build / bakefiles / wx.bkl
CommitLineData
ddf98968 1<?xml version="1.0" ?>
ddf98968
VS
2
3
77ffb593 4<!-- Master bakefile for wxWidgets -->
ddf98968
VS
5
6<makefile>
7
6ee3c064
VS
8 <!-- make sure setup.h is created as soon as possible: -->
9 <phony id="setup_h" cond="FORMAT!='autoconf'">
10 <dependency-of>all</dependency-of>
11 </phony>
12
ddf98968 13 <set var="BUILDING_LIB">1</set>
1dba7b4c 14
ddf98968
VS
15 <!-- common rules, names etc. for wx: -->
16 <include file="common.bkl"/>
1dba7b4c 17
ddf98968
VS
18 <!-- list of files sorted into categories: -->
19 <include file="files.bkl"/>
1dba7b4c 20
77ffb593 21 <!-- wxWidgets variant where everything is in one library: -->
ddf98968
VS
22 <include file="monolithic.bkl"/>
23 <!-- ...and when there are multiple libraries: -->
e86e1522 24 <include file="multilib.bkl"/>
af594eca 25
b158f13e 26 <if cond="IS_MSVC_PRJ">
af594eca
VS
27 <set var="MSVC6PRJ_MERGED_TARGETS">
28 <if cond="MONOLITHIC=='0'">$(MSVC6PRJ_MERGED_TARGETS_MULTILIB)</if>
29 <if cond="MONOLITHIC=='1'">$(MSVC6PRJ_MERGED_TARGETS_MONOLIB)</if>
30 </set>
31 </if>
1dba7b4c 32
4d264332
VS
33 <!-- OpenGL canvas is built as separate library in both cases: -->
34 <include file="opengl.bkl"/>
c79241a2
VS
35 <!-- Dynamically loadable plugins: -->
36 <include file="plugins.bkl"/>
1dba7b4c 37
ddf98968 38 <!-- Samples target (not dependency of 'all'): -->
ddf98968 39 <subproject id="samples">
289919bf
VS
40 <installable>no</installable>
41 <dir cond="FORMAT=='autoconf'">samples</dir>
5c3f21c6 42 <dir cond="FORMAT!='autoconf'">../../samples</dir>
ddf98968 43 </subproject>
1dba7b4c 44
f9e1c3c5 45 <if cond="FORMAT=='autoconf'">
1dba7b4c 46
f9e1c3c5
VS
47 <!-- WXRC compiler is built by default: -->
48 <!-- FIXME: this is dirty hack, better bakefile support for
49 conditional and optional subprojects is needed -->
50 <action id="wxrc" cond="USE_XRC=='1'">
51 <dependency-of>all</dependency-of>
7b3dba49
VS
52
53 <!-- some of these are not built in all configurations, <depends>
54 takes care of ignoring the disabled ones: -->
55 <depends>monodll</depends>
56 <depends>monolib</depends>
57 <depends>basedll</depends>
58 <depends>baselib</depends>
59 <depends>xmldll</depends>
60 <depends>xmllib</depends>
1dba7b4c 61
f9e1c3c5 62 <command>
98a04b4a 63 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) all ; fi)
f9e1c3c5
VS
64 </command>
65 </action>
66 <action id="clean-wxrc" cond="USE_XRC=='1'">
67 <dependency-of>clean</dependency-of>
68 <command>
98a04b4a 69 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) clean ; fi)
f9e1c3c5
VS
70 </command>
71 </action>
72 <action id="install-wxrc" cond="USE_XRC=='1'">
73 <dependency-of>install</dependency-of>
7b3dba49 74 <depends>wxrc</depends>
f9e1c3c5 75 <command>
98a04b4a 76 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) install ; fi)
f9e1c3c5
VS
77 </command>
78 </action>
1dba7b4c 79
ddf98968
VS
80 <!-- "make install": -->
81
82 <data-files>
83 <files>wxwin.m4</files>
84 <install-to>$(DATADIR)/aclocal</install-to>
85 </data-files>
86
07910a9a 87 <data-files>
9f0ff522 88 <srcdir>$(SRCDIR)/build/bakefiles/wxpresets/presets</srcdir>
84cd6e0c 89 <files>wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py</files>
07910a9a
VS
90 <install-to>$(DATADIR)/bakefile/presets</install-to>
91 </data-files>
92
ddf98968
VS
93 <action id="install-wxconfig">
94 <dependency-of>install</dependency-of>
95 <command>
004779cd 96 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
8708fa76 97 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
ceec2216 98 $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
58813598 99 (cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) $(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
ddf98968
VS
100 </command>
101 </action>
102
19beefa6
KO
103 <modify-target target="install">
104 <command>
105 $(DYLIB_RPATH_INSTALL)
106 </command>
107 </modify-target>
108
c8d58531 109 <set var="RCDEFS_H">
47bff9ff 110 <if cond="TOOLKIT=='MSW'">msw/rcdefs.h</if>
c8d58531 111 </set>
bad4a10f
VS
112
113
114 <data-files-tree>
47bff9ff
MW
115 <srcdir>
116 $(BUILDDIR)/lib/wx/include/$(TOOLCHAIN_FULLNAME)/wx
117 </srcdir>
c8d58531 118 <files>
47bff9ff 119 setup.h $(RCDEFS_H)
c8d58531 120 </files>
47bff9ff
MW
121 <install-to>
122 $(LIBDIR)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
123 </install-to>
bad4a10f 124 </data-files-tree>
ddf98968 125
aa163cb5
VS
126 <!-- FIXME: make this use per-target <headers> once it supports
127 prefix removal -->
bad4a10f 128 <data-files-tree>
ddf98968
VS
129 <srcdir>$(SRCDIR)/include</srcdir>
130 <files>$(ALL_HEADERS)</files>
166bcebb 131 <install-to>
a1bf307a 132 $(INCLUDEDIR)/wx-$(WX_RELEASE)$(WX_FLAVOUR)
166bcebb 133 </install-to>
bad4a10f 134 </data-files-tree>
ddf98968 135
065a32a5
VS
136 <!-- Locales: -->
137 <using module="gettext"/>
138 <gettext-catalogs id="locale">
139 <srcdir>$(SRCDIR)/locale</srcdir>
140 <catalog-name>wxstd</catalog-name>
141 <linguas>
142 ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk
143 zh zh_CN zh_TW
144 </linguas>
145 <install-to>$(LOCALEDIR)</install-to>
146 </gettext-catalogs>
4d931bcc
MW
147 <gettext-catalogs id="locale_msw">
148 <srcdir>$(SRCDIR)/locale/msw</srcdir>
149 <catalog-name>wxmsw</catalog-name>
150 <linguas>it</linguas>
151 <install-to>$(LOCALEDIR)</install-to>
152 </gettext-catalogs>
417f5137 153
ddf98968
VS
154
155 <!-- Mac OS X resources: -->
156 <set var="MACOS_R">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r</set>
157 <set var="MACOS_RSRC">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).rsrc</set>
25a4727e
DE
158 <action id="cocoa-res" cond="TOOLKIT=='COCOA'">
159 <dependency-of>all</dependency-of>
160 <set var="__targetname">$(MACOS_R)</set>
161 <command>
891ace05 162 $(REZ) -d __UNIX__ -useDF $(top_srcdir)/src/cocoa/dummy.r -o $(MACOS_RSRC)
25a4727e
DE
163 $(DEREZ) $(MACOS_RSRC) -useDF >$(MACOS_R)
164 </command>
165 <clean-files>$(MACOS_RSRC) $(MACOS_R)</clean-files>
166 </action>
167 <action id="cocoa-res-install" cond="TOOLKIT=='COCOA'">
168 <dependency-of>install</dependency-of>
a4297f6a 169 <depends>cocoa-res</depends>
25a4727e
DE
170 <command>
171 $(INSTALL_DATA) $(MACOS_R) $(LIBDIR)
172 $(INSTALL_DATA) $(MACOS_RSRC) $(LIBDIR)
173 </command>
174 </action>
ddf98968
VS
175
176 </if>
177
4cd612f9 178
b158f13e 179 <!-- copy setup.h on DOS/OS2/Windows if the format supports it: -->
adb783cc 180 <if cond="FORMAT!='autoconf' and IS_MSVC_PRJ=='0'">
4cd612f9 181 <mkdir id="libdir">
47652170
VS
182 <dir>$(LIBDIRNAME)</dir>
183 </mkdir>
ee929bcf 184 <mkdir id="libdir_setup">
47652170 185 <depends>libdir</depends>
1dba7b4c 186 <dir>$(SETUPHDIR)</dir>
ee929bcf
VS
187 </mkdir>
188 <mkdir id="libdir_setup_wx">
189 <depends>libdir_setup</depends>
6ee3c064 190 <dependency-of>setup_h</dependency-of>
1dba7b4c 191 <dir>$(SETUPHDIR)/wx</dir>
4cd612f9 192 </mkdir>
399a8824 193
ee929bcf 194 <set var="SETUP_H_SUBDIR">
399a8824 195 <if cond="WXUNIV=='1'">univ</if>
5c3f21c6
VZ
196 <if cond="WXUNIV=='0' and PLATFORM_OS2!='1'">$(TOOLKIT_LOWERCASE)</if>
197 <if cond="WXUNIV=='0' and PLATFORM_OS2=='1'">os2</if>
399a8824 198 </set>
1dba7b4c 199
399a8824 200 <copy-file-to-file-if-not-exist id="master_setup.h">
ee929bcf
VS
201 <src>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup0.h</src>
202 <dst>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup.h</dst>
b0251b16 203 <dependency-of>setup_h</dependency-of>
6ee3c064
VS
204 </copy-file-to-file-if-not-exist>
205 <copy-file-to-file-if-not-exist id="setup.h">
206 <dependency-of>setup_h</dependency-of>
ee929bcf
VS
207 <src>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup.h</src>
208 <dst>$(SETUPHDIR)/wx/setup.h</dst>
6ee3c064 209 </copy-file-to-file-if-not-exist>
4cd612f9
VS
210 </if>
211
289919bf 212
c8d58531 213 <!-- create rcdefs.h on Windows: -->
5c3f21c6 214 <if cond="FORMAT in ['borland','mingw','msvc','watcom']">
c8d58531
MW
215
216 <mkdir id="libdir_setup_wx_msw">
217 <depends>libdir_setup_wx</depends>
218 <dir>$(SETUPHDIR)/wx/msw</dir>
219 </mkdir>
220
221 <action id="rcdefs.h">
222
58b59bb7
MW
223 <!-- Can't seem to set id to a name with a dollar sign
224 so use __targetname as a temporary work around -->
225 <set var="__targetname">$(SETUPHDIR)\wx\msw\rcdefs.h</set>
226
c8d58531
MW
227 <dependency-of>setup_h</dependency-of>
228 <depends>libdir_setup_wx_msw</depends>
229 <depends-on-file>$(SRCDIR)/include/wx/msw/genrcdefs.h</depends-on-file>
230
231 <command>
2275c732 232 $(DOLLAR)(CPP) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
c8d58531
MW
233 </command>
234
235 </action>
236
237 </if>
238
239
289919bf 240 <if cond="FORMAT=='autoconf'">
065a32a5
VS
241
242 <!-- Show this banner after installation: -->
289919bf
VS
243 <modify-target target="install">
244 <command>
245@echo " "
d424f5ae
VS
246@echo " ------------------------------------------------------"
247@echo " "
77ffb593 248@echo " The installation of wxWidgets is finished. On certain"
289919bf
VS
249@echo " platforms (e.g. Linux) you'll now have to run ldconfig"
250@echo " if you installed a shared library and also modify the"
251@echo " LD_LIBRARY_PATH (or equivalent) environment variable."
252@echo " "
77ffb593 253@echo " wxWidgets comes with no guarantees and doesn't claim"
289919bf
VS
254@echo " to be suitable for any purpose."
255@echo " "
526954c5 256@echo " Read the wxWindows Licence on licencing conditions."
d424f5ae
VS
257@echo " "
258@echo " ------------------------------------------------------"
289919bf
VS
259@echo " "
260 </command>
261 </modify-target>
289919bf 262
065a32a5 263 <!-- add "make dist" target to autoconf: -->
ca58c9bb 264 <set var="VARS_DONT_ELIMINATE" append="1">
2f5e790c 265 ALL_PORTS_BASE_HEADERS ALL_BASE_SOURCES WX_VERSION
ca58c9bb
VS
266 </set>
267 <fragment format="autoconf" file="make_dist.mk"/>
065a32a5 268
ca58c9bb 269 </if>
1dba7b4c 270
5d1000e7 271 <include file="build_cfg.bkl"/>
ca58c9bb 272
ddf98968 273</makefile>