use common resource and icon files for samples
[wxWidgets.git] / build / bakefiles / common_samples.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5     
6     <include file="common.bkl"/>
7     <set var="file_common_samples_included">1</set>
8     
9     <!-- =============================================================== -->
10     <!--                    Template for wxWindows samples:              -->
11     <!-- =============================================================== -->
12
13     <if cond="FORMAT=='autoconf'">
14         <set var="MACOSX_RESOURCES">
15             <if cond="TOOLKIT=='MAC'">
16                 Carbon.r $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r $(WXTOPDIR)samples/sample.r
17             </if>
18         </set>
19     </if>
20
21     <set var="DLLFLAG">
22         <if cond="SHARED=='1'">WXUSINGDLL</if>
23     </set>
24     
25     <template id="wx_util_b" template="wx">
26         <include>$(SRCDIR)</include>
27         <define>$(DLLFLAG)</define>
28     </template>
29     
30     <template id="wx_util" template="wx_util_b">
31         <app-type>gui</app-type>
32         <mac-res cond="FORMAT=='autoconf'">$(MACOSX_RESOURCES)</mac-res>
33         <win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
34     </template>
35     
36     <template id="wx_util_console" template="wx_util_b">
37         <app-type>console</app-type>
38     </template>
39     
40     <template id="wx_sample" template="wx_util">
41         <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
42     </template>
43     <template id="wx_sample_console" template="wx_util_console">
44         <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
45     </template>
46
47     
48     <!-- =============================================================== -->
49     <!--                    Support for samples data files:              -->
50     <!-- =============================================================== -->
51
52     <define-rule name="wx-data" extends="copy-files">
53         <template>
54             <dependency-of>all</dependency-of>
55             <dstdir>$(BUILDDIR)</dstdir>
56             <srcdir>$(SRCDIR)</srcdir>
57         </template>
58
59         <!--
60         VS - FIXME:
61         Don't clean the files because it would wipe out sources files if
62         BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
63         but it would be better to delete the files during "make clean" if
64         BUILDDIR!=SRCDIR.
65         
66         <define-tag name="files">
67             <clean-files>
68                 $(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
69             </clean-files>
70         </define-tag>
71         -->
72     </define-rule>
73
74 </makefile>