generate makefile.unx files using bakefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
591a46d420
commit
1f9e358229
@ -256,6 +256,15 @@
|
||||
-DOPTIONS_FILE=../../../../build/msw/config.wat
|
||||
</add-flags>
|
||||
|
||||
|
||||
<!-- Makefiles for out-of-tree building of samples on Unix: -->
|
||||
<add-formats files="../../samples/*/*.bkl,../../samples/*/*/*.bkl">
|
||||
gnu
|
||||
</add-formats>
|
||||
<add-flags files="../../samples/*/*.bkl,../../samples/*/*/*.bkl"
|
||||
formats="gnu">
|
||||
-DOUT_OF_TREE_MAKEFILES=1 -o$(INPUT_FILE_DIR)/makefile.unx
|
||||
</add-flags>
|
||||
|
||||
<!-- Personal customizations (not in CVS): -->
|
||||
<include file="Bakefiles.local.bkgen" ignore_missing="1"/>
|
||||
|
@ -3,121 +3,17 @@
|
||||
|
||||
<makefile>
|
||||
|
||||
<include file="common.bkl"/>
|
||||
<set var="file_common_samples_included">1</set>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Template for wxWidgets samples: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<set var="MACOSX_RESOURCES">
|
||||
<if cond="TOOLKIT=='MAC'">
|
||||
Carbon.r sample.r
|
||||
</if>
|
||||
</set>
|
||||
<if cond="not isdefined('OUT_OF_TREE_MAKEFILES')">
|
||||
<set var="OUT_OF_TREE_MAKEFILES">0</set>
|
||||
</if>
|
||||
|
||||
<set var="DLLFLAG">
|
||||
<if cond="SHARED=='1'">WXUSINGDLL</if>
|
||||
</set>
|
||||
|
||||
<template id="wx_util_b" template="wx">
|
||||
<include>$(SRCDIR)</include>
|
||||
<define>$(DLLFLAG)</define>
|
||||
</template>
|
||||
|
||||
<template id="wx_util" template="wx_util_b">
|
||||
<app-type>gui</app-type>
|
||||
<mac-res cond="FORMAT=='autoconf'">$(MACOSX_RESOURCES)</mac-res>
|
||||
<!-- resource files includes: -->
|
||||
<include>$(SRCDIR)/$(WXTOPDIR)samples</include>
|
||||
<!-- this include is not added via <include> for autoconf, see
|
||||
common.bkl: -->
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<res-include>$(RCDEFDIR)</res-include>
|
||||
<res-include>$(TOP_SRCDIR)include</res-include>
|
||||
</if>
|
||||
|
||||
<win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-os2-lib-resource/>
|
||||
</if>
|
||||
|
||||
<!-- FIXME: temporary, until bakefile can reuse existing pch files -->
|
||||
<if cond="FORMAT!='autoconf'">
|
||||
<define>NOPCH</define>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
<template id="wx_util_console" template="wx_util_b">
|
||||
<app-type>console</app-type>
|
||||
<define>wxUSE_GUI=0</define>
|
||||
</template>
|
||||
|
||||
<template id="wx_sample" template="wx_util">
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-mac-app-bundle/>
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
<template id="wx_sample_console" template="wx_util_console">
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Support for samples data files: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<define-rule name="wx-data" extends="copy-files">
|
||||
<template>
|
||||
<dependency-of>all</dependency-of>
|
||||
<dstdir>$(BUILDDIR)</dstdir>
|
||||
<srcdir>$(SRCDIR)</srcdir>
|
||||
</template>
|
||||
|
||||
<!--
|
||||
VS - FIXME:
|
||||
Don't clean the files because it would wipe out sources files if
|
||||
BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
|
||||
but it would be better to delete the files during "make clean" if
|
||||
BUILDDIR!=SRCDIR.
|
||||
|
||||
<define-tag name="files">
|
||||
<clean-files>
|
||||
$(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
|
||||
</clean-files>
|
||||
</define-tag>
|
||||
-->
|
||||
</define-rule>
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Misc platform specialities: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<include file="mac_bundles.bkl"/>
|
||||
|
||||
<!--
|
||||
A hack to include precompiled OS/2 resource file in apps instead of
|
||||
compiling it from .rc file (gcc on OS/2 doesn't ship with resource
|
||||
compiler):
|
||||
-->
|
||||
<define-tag name="wx-os2-lib-resource" rules="exe">
|
||||
<set var="os2_lib_res">
|
||||
<if cond="PLATFORM_OS2=='1'">
|
||||
$(TOP_SRCDIR)include/wx/os2/wx.res
|
||||
</if>
|
||||
</set>
|
||||
<set var="__objects" append="1">$(os2_lib_res)</set>
|
||||
</define-tag>
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<include file="common_samples_outoftree.bkl"/>
|
||||
</if>
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='0'">
|
||||
<include file="common_samples_intree.bkl"/>
|
||||
</if>
|
||||
|
||||
|
||||
</makefile>
|
||||
|
121
build/bakefiles/common_samples_intree.bkl
Normal file
121
build/bakefiles/common_samples_intree.bkl
Normal file
@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<makefile>
|
||||
|
||||
<include file="common.bkl"/>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Template for wxWidgets samples: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<set var="MACOSX_RESOURCES">
|
||||
<if cond="TOOLKIT=='MAC'">
|
||||
Carbon.r sample.r
|
||||
</if>
|
||||
</set>
|
||||
</if>
|
||||
|
||||
<set var="DLLFLAG">
|
||||
<if cond="SHARED=='1'">WXUSINGDLL</if>
|
||||
</set>
|
||||
|
||||
<template id="wx_util_b" template="wx">
|
||||
<include>$(SRCDIR)</include>
|
||||
<define>$(DLLFLAG)</define>
|
||||
</template>
|
||||
|
||||
<template id="wx_util" template="wx_util_b">
|
||||
<app-type>gui</app-type>
|
||||
<mac-res cond="FORMAT=='autoconf'">$(MACOSX_RESOURCES)</mac-res>
|
||||
<!-- resource files includes: -->
|
||||
<include>$(SRCDIR)/$(WXTOPDIR)samples</include>
|
||||
<!-- this include is not added via <include> for autoconf, see
|
||||
common.bkl: -->
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<res-include>$(RCDEFDIR)</res-include>
|
||||
<res-include>$(TOP_SRCDIR)include</res-include>
|
||||
</if>
|
||||
|
||||
<win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-os2-lib-resource/>
|
||||
</if>
|
||||
|
||||
<!-- FIXME: temporary, until bakefile can reuse existing pch files -->
|
||||
<if cond="FORMAT!='autoconf'">
|
||||
<define>NOPCH</define>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
<template id="wx_util_console" template="wx_util_b">
|
||||
<app-type>console</app-type>
|
||||
<define>wxUSE_GUI=0</define>
|
||||
</template>
|
||||
|
||||
<template id="wx_sample" template="wx_util">
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-mac-app-bundle/>
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
<template id="wx_sample_console" template="wx_util_console">
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Support for samples data files: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<define-rule name="wx-data" extends="copy-files">
|
||||
<template>
|
||||
<dependency-of>all</dependency-of>
|
||||
<dstdir>$(BUILDDIR)</dstdir>
|
||||
<srcdir>$(SRCDIR)</srcdir>
|
||||
</template>
|
||||
|
||||
<!--
|
||||
VS - FIXME:
|
||||
Don't clean the files because it would wipe out sources files if
|
||||
BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
|
||||
but it would be better to delete the files during "make clean" if
|
||||
BUILDDIR!=SRCDIR.
|
||||
|
||||
<define-tag name="files">
|
||||
<clean-files>
|
||||
$(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
|
||||
</clean-files>
|
||||
</define-tag>
|
||||
-->
|
||||
</define-rule>
|
||||
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Misc platform specialities: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<include file="mac_bundles.bkl"/>
|
||||
|
||||
<!--
|
||||
A hack to include precompiled OS/2 resource file in apps instead of
|
||||
compiling it from .rc file (gcc on OS/2 doesn't ship with resource
|
||||
compiler):
|
||||
-->
|
||||
<define-tag name="wx-os2-lib-resource" rules="exe">
|
||||
<set var="os2_lib_res">
|
||||
<if cond="PLATFORM_OS2=='1'">
|
||||
$(TOP_SRCDIR)include/wx/os2/wx.res
|
||||
</if>
|
||||
</set>
|
||||
<set var="__objects" append="1">$(os2_lib_res)</set>
|
||||
</define-tag>
|
||||
</if>
|
||||
|
||||
</makefile>
|
43
build/bakefiles/common_samples_outoftree.bkl
Normal file
43
build/bakefiles/common_samples_outoftree.bkl
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<makefile>
|
||||
|
||||
<!-- =============================================================== -->
|
||||
<!-- Templates for out-of-tree Unix makefiles for wxWidgets samples: -->
|
||||
<!-- =============================================================== -->
|
||||
|
||||
<include file="wxpresets/presets/wx.bkl"/>
|
||||
|
||||
<template id="wx_app_base" template="wx">
|
||||
<include>$(SRCDIR)</include>
|
||||
</template>
|
||||
|
||||
<template id="wx_util" template="wx_app_base">
|
||||
<app-type>gui</app-type>
|
||||
</template>
|
||||
|
||||
<template id="wx_util_console" template="wx_app_base">
|
||||
<app-type>console</app-type>
|
||||
</template>
|
||||
|
||||
<template id="wx_sample" template="wx_util"/>
|
||||
<template id="wx_sample_console" template="wx_util_console"/>
|
||||
|
||||
|
||||
<define-rule name="wx-gui-plugin" extends="module">
|
||||
<template template="wx_app_base"/>
|
||||
</define-rule>
|
||||
|
||||
|
||||
<!-- empty stubs for things that don't make sense for makefile.unx: -->
|
||||
<template id="wx_append"/>
|
||||
<template id="wx_append_base"/>
|
||||
|
||||
<define-rule name="wx-data" pseudo="1">
|
||||
<define-tag name="files"/>
|
||||
<define-tag name="dstdir"/>
|
||||
<define-tag name="srcdir"/>
|
||||
</define-rule>
|
||||
|
||||
</makefile>
|
@ -3,6 +3,10 @@
|
||||
|
||||
<include file="../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<set var="USE_ODBC">1</set>
|
||||
</if>
|
||||
|
||||
<exe id="dbtest"
|
||||
cond="USE_ODBC=='1'"
|
||||
template="wx_sample" template_append="wx_append">
|
||||
|
@ -4,6 +4,9 @@
|
||||
<include file="../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<set var="GENERIC_DIALOGS_IN_NATIVE_BUILDS">
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<!-- no files that are not part of the sample in this case -->
|
||||
</if>
|
||||
<if cond="TOOLKIT=='MSW' and WXUNIV=='0' and SHARED=='0'">
|
||||
$(WXTOPDIR)src/generic/colrdlgg.cpp
|
||||
$(WXTOPDIR)src/generic/dirdlgg.cpp
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
<include file="../../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<set var="USE_OPENGL">1</set>
|
||||
</if>
|
||||
|
||||
<exe id="cube" template="wx_sample" template_append="wx_append" cond="USE_OPENGL=='1'">
|
||||
<sources>cube.cpp</sources>
|
||||
<wx-lib>gl</wx-lib>
|
||||
|
@ -5,6 +5,10 @@
|
||||
|
||||
<include file="../../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<set var="USE_OPENGL">1</set>
|
||||
</if>
|
||||
|
||||
<exe id="isosurf" template="wx_sample" template_append="wx_append" cond="USE_OPENGL=='1'">
|
||||
<sources>isosurf.cpp</sources>
|
||||
<wx-lib>gl</wx-lib>
|
||||
|
@ -4,6 +4,10 @@
|
||||
<makefile>
|
||||
|
||||
<include file="../../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<set var="USE_OPENGL">1</set>
|
||||
</if>
|
||||
|
||||
<exe id="penguin" template="wx_sample" template_append="wx_append" cond="USE_OPENGL=='1'">
|
||||
<sources>
|
||||
|
@ -5,6 +5,13 @@
|
||||
|
||||
<include file="../../build/bakefiles/common_samples.bkl"/>
|
||||
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<option name="SHARED">
|
||||
<default-value>0</default-value>
|
||||
<description>Build shared lib plugin</description>
|
||||
</option>
|
||||
</if>
|
||||
|
||||
<exe id="render" template="wx_sample" template_append="wx_append">
|
||||
<sources>render.cpp</sources>
|
||||
<wx-lib>core</wx-lib>
|
||||
|
Loading…
Reference in New Issue
Block a user