2005-01-27 17:47:37 -05:00
|
|
|
<?xml version="1.0" ?>
|
|
|
|
<!-- $Id$ -->
|
|
|
|
|
|
|
|
<!-- Original source: http://wiki.wxwidgets.org/wiki.pl?Bakefile -->
|
|
|
|
<!-- Modified by: Francesco Montorsi <frm@users.sourceforge.net> -->
|
|
|
|
<!-- Vaclav Slavik <vslavik@fastmail.fm> to better fit
|
|
|
|
into Bakefile's presets -->
|
|
|
|
<!-- Creation date: 6/9/2004 -->
|
|
|
|
<!-- Last revision: 22/1/2005 off-CVS -->
|
|
|
|
<!-- $Id$ -->
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
FIXME: this template has (at least) the following bugs:
|
|
|
|
|
|
|
|
* it's MSW-only, the port is assumed to be wxMSW unconditionally
|
|
|
|
|
|
|
|
* multiple wx configurations (CFG variable set when building the
|
|
|
|
library) are not supported
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- makefile tag signifies the beginning of the bakefile -->
|
|
|
|
<makefile>
|
|
|
|
|
|
|
|
<requires version="0.1.5"/>
|
|
|
|
|
|
|
|
<!-- OPTIONS -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- These are essentially the configurations you -->
|
|
|
|
<!-- want in bakefile. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- In MSVC these are the different build -->
|
|
|
|
<!-- configurations you can have (in the build menu), -->
|
|
|
|
<!-- and in autoconf is enabled with enable-xxx=xx. -->
|
2005-05-31 05:20:43 -04:00
|
|
|
<!-- For other compilers a separate configuration -->
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- file is created (such as config.gcc on gcc) -->
|
|
|
|
<!-- which has several options a user can modify. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Note that the above only happens if an option -->
|
|
|
|
<!-- is not constant, i.e. if it cannot be determined -->
|
|
|
|
<!-- by bakefile itself. -->
|
|
|
|
|
2005-03-22 07:59:41 -05:00
|
|
|
<!-- this is a temporary variable until there is non general -->
|
|
|
|
<!-- function in bakefiles for returning native markup for -->
|
|
|
|
<!-- reading envrionment variables -->
|
|
|
|
<set var="ENV_VAR">
|
|
|
|
<if cond="FORMAT=='watcom'">%</if>
|
|
|
|
<if cond="FORMAT!='watcom'"></if>
|
|
|
|
</set>
|
2005-06-15 20:18:22 -04:00
|
|
|
|
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- The directory where wxWidgets is installed: -->
|
2005-06-14 14:11:15 -04:00
|
|
|
<if cond="not isdefined('WX_DIR')">
|
|
|
|
<set var="WX_DIR_DEFAULT" overwrite="0">$(DOLLAR)($(ENV_VAR)WXWIN)</set>
|
|
|
|
<option name="WX_DIR" category="path">
|
|
|
|
<default-value>$(WX_DIR_DEFAULT)</default-value>
|
|
|
|
<description>
|
|
|
|
The directory where wxWidgets library is installed
|
|
|
|
</description>
|
|
|
|
</option>
|
|
|
|
</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
|
|
|
|
<!-- This is a standard option that determines -->
|
|
|
|
<!-- whether the user wants to build this library as -->
|
|
|
|
<!-- a dll or as a static library. -->
|
2005-06-14 14:11:15 -04:00
|
|
|
<if cond="not isdefined('WX_SHARED')">
|
|
|
|
<set var="WX_SHARED_DEFAULT" overwrite="0">0</set>
|
|
|
|
<option name="WX_SHARED">
|
|
|
|
<values>0,1</values>
|
|
|
|
<values-description>,DLL</values-description>
|
|
|
|
<default-value>$(WX_SHARED_DEFAULT)</default-value>
|
|
|
|
<description>
|
|
|
|
Use DLL build of wx library to use?
|
|
|
|
</description>
|
|
|
|
</option>
|
|
|
|
</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
|
|
|
|
<!-- Configuration for building the bakefile with -->
|
|
|
|
<!-- unicode strings or not (unicode or ansi). -->
|
2005-06-14 14:11:15 -04:00
|
|
|
<if cond="not isdefined('WX_UNICODE')">
|
|
|
|
<set var="WX_UNICODE_DEFAULT" overwrite="0">0</set>
|
|
|
|
<option name="WX_UNICODE">
|
|
|
|
<values>0,1</values>
|
|
|
|
<values-description>,Unicode</values-description>
|
2005-06-15 20:18:22 -04:00
|
|
|
<default-value>$(WX_UNICODE_DEFAULT)</default-value>
|
2005-06-14 14:11:15 -04:00
|
|
|
<description>
|
|
|
|
Compile Unicode build of wxWidgets?
|
|
|
|
</description>
|
|
|
|
</option>
|
|
|
|
</if>
|
|
|
|
|
2005-06-15 18:30:01 -04:00
|
|
|
<if cond="not isdefined('WX_DEBUG')">
|
2005-06-14 14:11:15 -04:00
|
|
|
<set var="WX_DEBUG_DEFAULT" overwrite="0">1</set>
|
2005-06-15 18:30:01 -04:00
|
|
|
<option name="WX_DEBUG">
|
|
|
|
<values>0,1</values>
|
2005-06-14 14:11:15 -04:00
|
|
|
<values-description>Release,Debug</values-description>
|
|
|
|
<default-value>$(WX_DEBUG_DEFAULT)</default-value>
|
|
|
|
<description>
|
|
|
|
Use debug build of wxWidgets (define __WXDEBUG__)?
|
|
|
|
</description>
|
|
|
|
</option>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if cond="not isdefined('WX_VERSION')">
|
2005-10-06 05:08:27 -04:00
|
|
|
<set var="WX_VERSION_DEFAULT" overwrite="0">27</set>
|
2005-06-14 14:11:15 -04:00
|
|
|
<option name="WX_VERSION">
|
|
|
|
<default-value>$(WX_VERSION_DEFAULT)</default-value>
|
|
|
|
<description>
|
|
|
|
Version of the wx library to build against.
|
|
|
|
</description>
|
|
|
|
</option>
|
|
|
|
</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
|
|
|
|
<!-- HELPER VARIABLES -->
|
|
|
|
<!-- -->
|
2005-06-15 20:18:22 -04:00
|
|
|
|
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- The unicode define we want. By default bakefile -->
|
|
|
|
<!-- makes variables an empty string, so if unicode -->
|
|
|
|
<!-- is not defined $(UNICODE_DEFINE) would expand -->
|
|
|
|
<!-- to nothing (literally). -->
|
|
|
|
<set var="WXUNICODE_DEFINE">
|
|
|
|
<if cond="WX_UNICODE=='1'">_UNICODE</if>
|
2005-06-15 20:18:22 -04:00
|
|
|
</set>
|
|
|
|
|
|
|
|
<!-- The debug define we need with win32 compilers -->
|
|
|
|
<!-- (on Linux, the wx-config program is used). -->
|
|
|
|
<set var="WXDEBUG_DEFINE">
|
|
|
|
<if cond="WX_DEBUG=='1'">__WXDEBUG__</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
</set>
|
|
|
|
|
|
|
|
<!-- These are handy ways of dealing with the -->
|
2005-06-15 20:18:22 -04:00
|
|
|
<!-- extensions in the library names of the -->
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- wxWindows library. -->
|
|
|
|
<set var="WXLIBPOSTFIX">
|
2005-06-15 18:30:01 -04:00
|
|
|
<if cond="WX_DEBUG=='1' and WX_UNICODE=='1'">ud</if>
|
|
|
|
<if cond="WX_DEBUG=='1' and WX_UNICODE=='0'">d</if>
|
|
|
|
<if cond="WX_DEBUG=='0' and WX_UNICODE=='1'">u</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
</set>
|
2005-06-14 14:46:49 -04:00
|
|
|
<set var="WX3RDPARTYLIBPOSTFIX">
|
2005-06-15 18:30:01 -04:00
|
|
|
<if cond="WX_DEBUG=='1'">d</if>
|
2005-06-15 18:17:53 -04:00
|
|
|
</set>
|
|
|
|
|
|
|
|
<set var="WXCPU">
|
|
|
|
<if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
</set>
|
|
|
|
|
|
|
|
<set var="WXLIBPATH">
|
2005-06-15 18:17:53 -04:00
|
|
|
<if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_lib</if>
|
|
|
|
<if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_dll</if>
|
2005-01-27 17:47:37 -05:00
|
|
|
</set>
|
|
|
|
|
2005-06-15 20:18:22 -04:00
|
|
|
<set var="WXPORT">
|
|
|
|
<if cond="FORMAT=='msevc4prj'">wince</if>
|
|
|
|
<if cond="FORMAT!='msevc4prj'">msw</if>
|
|
|
|
</set>
|
|
|
|
<set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)$(WXPORT)$(WXLIBPOSTFIX)</set>
|
|
|
|
|
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- WX TEMPLATE -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- While not required, templates make your -->
|
|
|
|
<!-- bakefiles much more readable. Templates, in -->
|
|
|
|
<!-- essence, are abstract classes like c++. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Your build targets "inherit" the template, -->
|
|
|
|
<!-- along with the info associated with the template -->
|
|
|
|
|
|
|
|
<!-- -->
|
|
|
|
<!-- wxWidgets LIBRARY/APP TEMPLATE -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- The "base class" of all our build targets -->
|
|
|
|
<!-- This links with the appropriate native -->
|
2005-05-31 05:20:43 -04:00
|
|
|
<!-- libraries required by the platform, the libraries -->
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- we want for our stuff, and the wxWindows libs. -->
|
|
|
|
|
|
|
|
|
2005-06-15 20:18:22 -04:00
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- this tag is used to include wx libraries: -->
|
|
|
|
<define-tag name="wx-lib" rules="exe,dll,module">
|
|
|
|
<if cond="value=='base'">
|
|
|
|
<sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</sys-lib>
|
|
|
|
</if>
|
2005-05-11 17:29:28 -04:00
|
|
|
<if cond="value in ['net','xml', 'odbc']">
|
2005-01-27 17:47:37 -05:00
|
|
|
<sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
|
|
|
|
</if>
|
2005-09-25 07:19:39 -04:00
|
|
|
<if cond="value not in ['base','net', 'odbc', 'xml']">
|
2005-06-15 20:18:22 -04:00
|
|
|
<sys-lib>wx$(WXPORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
|
2005-01-27 17:47:37 -05:00
|
|
|
</if>
|
|
|
|
</define-tag>
|
|
|
|
|
|
|
|
<!-- just a placeholder to mark the place where <wx-lib> will be placed,
|
|
|
|
thanks to the order precedence declaration below it: -->
|
|
|
|
<define-tag name="__wx-libs-point" rules="exe,dll,module"/>
|
|
|
|
<tag-info name="wx-lib"
|
|
|
|
position="before:__wx-libs-point"/>
|
2005-04-04 16:25:38 -04:00
|
|
|
<tag-info name="__wx-syslibs"
|
|
|
|
position="after:__wx-libs-point"/>
|
2005-06-15 20:18:22 -04:00
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
|
2005-01-28 17:25:08 -05:00
|
|
|
<!-- template for static wx libraries: -->
|
|
|
|
<template id="wx-lib">
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- MISCELLANEOUS -->
|
2005-06-15 20:18:22 -04:00
|
|
|
<if cond="FORMAT=='mingw'">
|
2005-01-27 17:47:37 -05:00
|
|
|
<define>HAVE_W32API_H</define>
|
|
|
|
<ldflags>-mthreads</ldflags>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<define>$(WXUNICODE_DEFINE)</define>
|
2005-06-15 20:18:22 -04:00
|
|
|
<define>$(WXDEBUG_DEFINE)</define>
|
2005-01-27 17:47:37 -05:00
|
|
|
<define>__WXMSW__</define>
|
|
|
|
|
|
|
|
<include>$(WX_DIR)$(WXLIBINCLUDE)</include>
|
|
|
|
<include>$(WX_DIR)/include</include>
|
2005-01-28 17:25:08 -05:00
|
|
|
</template>
|
2005-06-15 20:18:22 -04:00
|
|
|
|
|
|
|
|
2005-04-04 16:25:38 -04:00
|
|
|
<!-- this ugly tag contains all sys-lib tags used by "wx" template,
|
|
|
|
in order to make sure they are not reorder when wx-lib is moved
|
|
|
|
after __wx-libs-point: -->
|
|
|
|
<define-tag name="__wx-syslibs" rules="exe,dll,module">
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- wx 3rd party libs, always use them: -->
|
2005-06-16 14:40:20 -04:00
|
|
|
<sys-lib cond="FORMAT!='msevc4prj'">wxtiff$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
|
|
|
|
<sys-lib>wxjpeg$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
|
|
|
|
<sys-lib>wxpng$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
|
|
|
|
<sys-lib>wxzlib$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
|
|
|
|
<!-- For regex we won't use the WX3RDPARTYLIBPOSTIX postfix:
|
2005-01-27 17:47:37 -05:00
|
|
|
unliked tiff, jpeg, png, zlib, expat, when building
|
|
|
|
in Unicode mode, the "u" suffix is appended to regex -->
|
2005-06-16 14:40:20 -04:00
|
|
|
<sys-lib cond="FORMAT!='msevc4prj'">wxregex$(WXLIBPOSTFIX)</sys-lib>
|
2005-06-14 14:46:49 -04:00
|
|
|
<sys-lib>wxexpat$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
|
2005-06-15 20:18:22 -04:00
|
|
|
|
2005-01-27 17:47:37 -05:00
|
|
|
<!-- link-in system libs that wx depends on: -->
|
|
|
|
<!-- If on borland, we don't need to do much -->
|
|
|
|
<if cond="FORMAT=='borland'">
|
|
|
|
<sys-lib>ole2w32</sys-lib>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- Non-borland, on the other hand... -->
|
2005-06-15 18:17:53 -04:00
|
|
|
<if cond="FORMAT not in ['borland','msevc4prj']">
|
2005-01-27 17:47:37 -05:00
|
|
|
<sys-lib>kernel32</sys-lib>
|
|
|
|
<sys-lib>user32</sys-lib>
|
|
|
|
<sys-lib>gdi32</sys-lib>
|
|
|
|
<sys-lib>comdlg32</sys-lib>
|
|
|
|
<sys-lib>winspool</sys-lib>
|
|
|
|
<sys-lib>winmm</sys-lib>
|
|
|
|
<sys-lib>shell32</sys-lib>
|
|
|
|
<sys-lib>comctl32</sys-lib>
|
|
|
|
<sys-lib>ole32</sys-lib>
|
|
|
|
<sys-lib>oleaut32</sys-lib>
|
|
|
|
<sys-lib>uuid</sys-lib>
|
|
|
|
<sys-lib>rpcrt4</sys-lib>
|
|
|
|
<sys-lib>advapi32</sys-lib>
|
|
|
|
<sys-lib>wsock32</sys-lib>
|
|
|
|
<sys-lib>odbc32</sys-lib>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<!-- Libs common to both borland and MSVC -->
|
|
|
|
<if cond="FORMAT=='msvc' or FORMAT=='msvc6prj' or FORMAT=='borland'">
|
|
|
|
<sys-lib>oleacc</sys-lib>
|
|
|
|
</if>
|
2005-04-04 16:25:38 -04:00
|
|
|
</define-tag>
|
2005-06-15 20:18:22 -04:00
|
|
|
|
2005-04-04 16:25:38 -04:00
|
|
|
<!-- template for wx executables/dlls: -->
|
|
|
|
<template id="wx" template="wx-lib">
|
|
|
|
<lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>
|
|
|
|
|
|
|
|
<!-- wx libs must come before 3rd party and sys libs, this is
|
|
|
|
the place where the hack explained above is carried on: -->
|
|
|
|
<__wx-libs-point/>
|
|
|
|
<__wx-syslibs/>
|
2005-01-27 17:47:37 -05:00
|
|
|
</template>
|
|
|
|
|
|
|
|
</makefile>
|