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