fixed samples compilation when using configure and mingw (missing include for windres)
[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 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         <!-- resource files includes: -->
34         <include>$(SRCDIR)/$(WXTOPDIR)samples</include>
35         <!-- this include is not added via <include> for autoconf, see
36              common.bkl: -->
37         <res-include cond="FORMAT=='autoconf'">
38             $(TOP_SRCDIR)include
39         </res-include>
40         
41         <win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
42         <if cond="FORMAT=='autoconf'">
43             <wx-os2-lib-resource/>
44         </if>
45     </template>
46     
47     <template id="wx_util_console" template="wx_util_b">
48         <app-type>console</app-type>
49     </template>
50     
51     <template id="wx_sample" template="wx_util">
52         <if cond="FORMAT=='autoconf'">
53             <wx-mac-app-bundle/>
54             <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
55             <__command>$(LF)$(SAMPLES_RPATH_POSTLINK)</__command>
56         </if>
57     </template>
58     <template id="wx_sample_console" template="wx_util_console">
59         <if cond="FORMAT=='autoconf'">
60             <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
61             <__command>$(SAMPLES_RPATH_POSTLINK)</__command>
62         </if>
63     </template>
64
65     
66     <!-- =============================================================== -->
67     <!--                    Support for samples data files:              -->
68     <!-- =============================================================== -->
69
70     <define-rule name="wx-data" extends="copy-files">
71         <template>
72             <dependency-of>all</dependency-of>
73             <dstdir>$(BUILDDIR)</dstdir>
74             <srcdir>$(SRCDIR)</srcdir>
75         </template>
76
77         <!--
78         VS - FIXME:
79         Don't clean the files because it would wipe out sources files if
80         BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
81         but it would be better to delete the files during "make clean" if
82         BUILDDIR!=SRCDIR.
83         
84         <define-tag name="files">
85             <clean-files>
86                 $(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
87             </clean-files>
88         </define-tag>
89         -->
90     </define-rule>
91     
92     
93     <!-- =============================================================== -->
94     <!--                    Misc platform specialities:                  -->
95     <!-- =============================================================== -->
96
97     <if cond="FORMAT=='autoconf'">
98         <include file="mac_bundles.bkl"/>
99
100         <!--
101         A hack to include precompiled OS/2 resource file in apps instead of
102         compiling it from .rc file (gcc on OS/2 doesn't ship with resource
103         compiler):
104         -->
105         <define-tag name="wx-os2-lib-resource" rules="exe">        
106             <set var="os2_lib_res">
107                 <if cond="PLATFORM_OS2=='1'">
108                     $(TOP_SRCDIR)include/wx/os2/wx.res
109                 </if>
110             </set>
111             <set var="__objects" append="1">$(os2_lib_res)</set>
112         </define-tag>
113     </if>
114     
115
116 </makefile>