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