support for building contrib libraries
[wxWidgets.git] / build / bakefiles / common_samples.bkl
1 <?xml version="1.0" ?>
2 <makefile>
3     
4     <include file="common.bkl"/>
5
6     
7     <!-- =============================================================== -->
8     <!--                    Template for wxWindows samples:              -->
9     <!-- =============================================================== -->
10
11     <if cond="FORMAT=='autoconf'">
12         <set var="MACOSX_RESOURCES">
13             <if cond="TOOLKIT=='MAC'">
14                 Carbon.r ../../lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r
15             </if>
16         </set>
17     </if>
18     
19     <template id="wx_sample" template="wx">
20         <include>$(SRCDIR)</include>
21         <!-- Always link against the wxWin library in monolithic build: -->
22         <sys-lib>$(WXLIB_MONO)</sys-lib>
23         <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
24
25         <mac-res cond="FORMAT=='autoconf'">$(MACOSX_RESOURCES)</mac-res>
26     </template>
27
28     
29     <!-- =============================================================== -->
30     <!--                    Support for samples data files:              -->
31     <!-- =============================================================== -->
32
33     <define-rule name="wx-data" extends="copy-files">
34         <template>
35             <dependency-of>all</dependency-of>
36             <dstdir>$(BUILDDIR)</dstdir>
37             <srcdir>$(SRCDIR)</srcdir>
38         </template>
39         <define-tag name="files">
40             <clean-files>
41                 $(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
42             </clean-files>
43         </define-tag>
44     </define-rule>
45
46 </makefile>