common_samples_intree.bkl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" ?>
  2. <makefile>
  3. <include file="common.bkl"/>
  4. <!-- =============================================================== -->
  5. <!-- Template for wxWidgets samples: -->
  6. <!-- =============================================================== -->
  7. <set var="WX_ENABLE_PRECOMP_HEADERS">0</set>
  8. <set var="DLLFLAG">
  9. <if cond="SHARED=='1'">WXUSINGDLL</if>
  10. </set>
  11. <template id="wx_util_b" template="wx">
  12. <include>$(SRCDIR)</include>
  13. <define>$(DLLFLAG)</define>
  14. </template>
  15. <template id="wx_util" template="wx_util_b">
  16. <app-type>gui</app-type>
  17. <!-- resource files includes: -->
  18. <include>$(SRCDIR)/$(WXTOPDIR)samples</include>
  19. <!-- this include is not added via <include> for autoconf, see
  20. common.bkl: -->
  21. <if cond="FORMAT=='autoconf'">
  22. <res-include>$(RCDEFDIR)</res-include>
  23. <res-include>$(TOP_SRCDIR)include</res-include>
  24. </if>
  25. <win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
  26. <if cond="FORMAT=='autoconf'">
  27. <wx-os2-lib-resource/>
  28. </if>
  29. <!-- FIXME: temporary, until bakefile can reuse existing pch files -->
  30. <if cond="FORMAT!='autoconf'">
  31. <if cond="WX_ENABLE_PRECOMP_HEADERS=='0'">
  32. <define>NOPCH</define>
  33. </if>
  34. </if>
  35. </template>
  36. <template id="wx_util_console" template="wx_util_b">
  37. <app-type>console</app-type>
  38. <define>wxUSE_GUI=0</define>
  39. </template>
  40. <template id="wx_sample" template="wx_util">
  41. <if cond="FORMAT=='autoconf'">
  42. <wx-mac-app-bundle/>
  43. <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
  44. </if>
  45. </template>
  46. <template id="wx_sample_console" template="wx_util_console">
  47. <if cond="FORMAT=='autoconf'">
  48. <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
  49. </if>
  50. </template>
  51. <!-- =============================================================== -->
  52. <!-- Support for samples data files: -->
  53. <!-- =============================================================== -->
  54. <if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
  55. <define-rule name="wx-data" extends="copy-files">
  56. <template>
  57. <dependency-of>all</dependency-of>
  58. <dstdir>$(BUILDDIR)</dstdir>
  59. <srcdir>$(SRCDIR)</srcdir>
  60. </template>
  61. <!--
  62. VS - FIXME:
  63. Don't clean the files because it would wipe out sources files if
  64. BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
  65. but it would be better to delete the files during "make clean" if
  66. BUILDDIR!=SRCDIR.
  67. <define-tag name="files">
  68. <clean-files>
  69. $(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
  70. </clean-files>
  71. </define-tag>
  72. -->
  73. </define-rule>
  74. </if>
  75. <if cond="FORMAT_SUPPORTS_ACTIONS=='0'">
  76. <!-- empty stub for project-files formats which don't support <command> -->
  77. <define-rule name="wx-data" extends="action">
  78. <define-tag name="dstdir"/>
  79. <define-tag name="srcdir"/>
  80. <define-tag name="files"/>
  81. </define-rule>
  82. </if>
  83. <!-- =============================================================== -->
  84. <!-- Misc platform specialities: -->
  85. <!-- =============================================================== -->
  86. <if cond="FORMAT=='autoconf'">
  87. <include file="mac_bundles.bkl"/>
  88. <!--
  89. A hack to include precompiled OS/2 resource file in apps instead of
  90. compiling it from .rc file (gcc on OS/2 doesn't ship with resource
  91. compiler):
  92. -->
  93. <define-tag name="wx-os2-lib-resource" rules="exe">
  94. <set var="os2_lib_res">
  95. <if cond="PLATFORM_OS2=='1'">
  96. $(TOP_SRCDIR)include/wx/os2/wx.res
  97. </if>
  98. </set>
  99. <set var="__objects" append="1">$(os2_lib_res)</set>
  100. </define-tag>
  101. </if>
  102. </makefile>