do enable PCH for the tests, wx/wx.h was not precompiled for them resulting in much...
[wxWidgets.git] / build / bakefiles / common_samples_intree.bkl
1 <?xml version="1.0" ?>
2 <!-- $Id$ -->
3
4 <makefile>
5
6     <include file="common.bkl"/>
7
8     <!-- =============================================================== -->
9     <!--                    Template for wxWidgets samples:              -->
10     <!-- =============================================================== -->
11
12     <set var="DLLFLAG">
13         <if cond="SHARED=='1'">WXUSINGDLL</if>
14     </set>
15
16     <template id="wx_util_b" template="wx">
17         <include>$(SRCDIR)</include>
18         <define>$(DLLFLAG)</define>
19     </template>
20
21     <template id="wx_util" template="wx_util_b">
22         <app-type>gui</app-type>
23         <!-- resource files includes: -->
24         <include>$(SRCDIR)/$(WXTOPDIR)samples</include>
25         <!-- this include is not added via <include> for autoconf, see
26              common.bkl: -->
27         <if cond="FORMAT=='autoconf'">
28             <res-include>$(RCDEFDIR)</res-include>
29             <res-include>$(TOP_SRCDIR)include</res-include>
30         </if>
31
32         <win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
33         <if cond="FORMAT=='autoconf'">
34             <wx-os2-lib-resource/>
35         </if>
36
37         <!-- FIXME: temporary, until bakefile can reuse existing pch files -->
38         <if cond="FORMAT!='autoconf'">
39             <if cond="WX_ENABLE_PRECOMP_HEADERS!='1'">
40                 <define>NOPCH</define>
41             </if>
42         </if>
43     </template>
44
45     <template id="wx_util_console" template="wx_util_b">
46         <app-type>console</app-type>
47         <define>wxUSE_GUI=0</define>
48     </template>
49
50     <template id="wx_sample" template="wx_util">
51         <if cond="FORMAT=='autoconf'">
52             <wx-mac-app-bundle/>
53             <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
54             <postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
55         </if>
56     </template>
57     <template id="wx_sample_console" template="wx_util_console">
58         <if cond="FORMAT=='autoconf'">
59             <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
60             <postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
61         </if>
62     </template>
63
64
65     <!-- =============================================================== -->
66     <!--                    Support for samples data files:              -->
67     <!-- =============================================================== -->
68
69     <if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
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     </if>
92     <if cond="FORMAT_SUPPORTS_ACTIONS=='0'">
93         <!-- empty stub for project-files formats which don't support <command> -->
94         <define-rule name="wx-data" extends="action">
95             <define-tag name="dstdir"/>
96             <define-tag name="srcdir"/>
97             <define-tag name="files"/>
98         </define-rule>
99     </if>
100
101
102     <!-- =============================================================== -->
103     <!--                    Misc platform specialities:                  -->
104     <!-- =============================================================== -->
105
106     <if cond="FORMAT=='autoconf'">
107         <include file="mac_bundles.bkl"/>
108
109         <!--
110         A hack to include precompiled OS/2 resource file in apps instead of
111         compiling it from .rc file (gcc on OS/2 doesn't ship with resource
112         compiler):
113         -->
114         <define-tag name="wx-os2-lib-resource" rules="exe">
115             <set var="os2_lib_res">
116                 <if cond="PLATFORM_OS2=='1'">
117                     $(TOP_SRCDIR)include/wx/os2/wx.res
118                 </if>
119             </set>
120             <set var="__objects" append="1">$(os2_lib_res)</set>
121         </define-tag>
122     </if>
123
124 </makefile>