wx.bkl 9.5 KB

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