]> git.saurik.com Git - wxWidgets.git/blob - build/bakefiles/common_samples.bkl
define wxUSE_BOOKCTRL when wxUSE_NOTE/LIST/CHOICEBOOK are 0; also define it as as...
[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 wxWidgets samples: -->
11 <!-- =============================================================== -->
12
13 <if cond="FORMAT=='autoconf'">
14 <set var="MACOSX_RESOURCES">
15 <if cond="TOOLKIT=='MAC'">
16 Carbon.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 <if cond="FORMAT=='autoconf'">
38 <res-include>$(RCDEFDIR)</res-include>
39 <res-include>$(TOP_SRCDIR)include</res-include>
40 </if>
41
42 <win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
43 <if cond="FORMAT=='autoconf'">
44 <wx-os2-lib-resource/>
45 </if>
46
47 <!-- FIXME: temporary, until bakefile can reuse existing pch files -->
48 <if cond="FORMAT!='autoconf'">
49 <define>NOPCH</define>
50 </if>
51 </template>
52
53 <template id="wx_util_console" template="wx_util_b">
54 <app-type>console</app-type>
55 <define>wxUSE_GUI=0</define>
56 </template>
57
58 <template id="wx_sample" template="wx_util">
59 <if cond="FORMAT=='autoconf'">
60 <wx-mac-app-bundle/>
61 <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
62 <postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
63 </if>
64 </template>
65 <template id="wx_sample_console" template="wx_util_console">
66 <if cond="FORMAT=='autoconf'">
67 <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
68 <postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
69 </if>
70 </template>
71
72
73 <!-- =============================================================== -->
74 <!-- Support for samples data files: -->
75 <!-- =============================================================== -->
76
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
99
100 <!-- =============================================================== -->
101 <!-- Misc platform specialities: -->
102 <!-- =============================================================== -->
103
104 <if cond="FORMAT=='autoconf'">
105 <include file="mac_bundles.bkl"/>
106
107 <!--
108 A hack to include precompiled OS/2 resource file in apps instead of
109 compiling it from .rc file (gcc on OS/2 doesn't ship with resource
110 compiler):
111 -->
112 <define-tag name="wx-os2-lib-resource" rules="exe">
113 <set var="os2_lib_res">
114 <if cond="PLATFORM_OS2=='1'">
115 $(TOP_SRCDIR)include/wx/os2/wx.res
116 </if>
117 </set>
118 <set var="__objects" append="1">$(os2_lib_res)</set>
119 </define-tag>
120 </if>
121
122
123 </makefile>