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