<!-- is not constant, i.e. if it cannot be determined -->
<!-- by bakefile itself. -->
- <!-- 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>
-
- <!-- The directory where wxWidgets is installed: -->
- <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>
+ <!-- Presets for limited dmars make.exe format: -->
+ <if cond="FORMAT=='dmars'">
+ <set var="WX_UNICODE">0</set>
+ <set var="WX_DEBUG">1</set>
+ <set var="WX_SHARED">0</set>
+ </if>
+
<!-- This is a standard option that determines -->
<!-- whether the user wants to build this library as -->
<!-- a dll or as a static library. -->
- <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 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>
<!-- Configuration for building the bakefile with -->
<!-- unicode strings or not (unicode or ansi). -->
- <set var="WX_UNICODE_DEFAULT" overwrite="0">0</set>
- <option name="WX_UNICODE">
- <values>0,1</values>
- <values-description>,Unicode</values-description>
- <default-value>$(WX_UNICODE_DEFAULT)</default-value>
- <description>
- Compile Unicode build of wxWidgets?
- </description>
- </option>
-
- <set var="WX_DEBUG_DEFAULT" overwrite="0">1</set>
- <option name="WX_DEBUG">
- <values>0,1</values>
- <values-description>,Debug</values-description>
- <default-value>$(WX_DEBUG_DEFAULT)</default-value>
- <description>
- Use debug build of wxWidgets (define __WXDEBUG__)?
- </description>
- </option>
-
- <set var="WX_VERSION_DEFAULT" overwrite="0">26</set>
- <option name="WX_VERSION">
- <default-value>$(WX_VERSION_DEFAULT)</default-value>
- <description>
- Version of the wx library to build against.
- </description>
- </option>
+ <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>
+ <default-value>$(WX_UNICODE_DEFAULT)</default-value>
+ <description>
+ Compile Unicode build of wxWidgets?
+ </description>
+ </option>
+ </if>
+
+ <if cond="not isdefined('WX_DEBUG')">
+ <set var="WX_DEBUG_DEFAULT" overwrite="0">1</set>
+ <option name="WX_DEBUG">
+ <values>0,1</values>
+ <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')">
+ <set var="WX_VERSION_DEFAULT" overwrite="0">27</set>
+ <option name="WX_VERSION">
+ <default-value>$(WX_VERSION_DEFAULT)</default-value>
+ <description>
+ Version of the wx library to build against.
+ </description>
+ </option>
+ </if>
+
+ <if cond="not isdefined('WX_MONOLITHIC')">
+ <set var="WX_MONOLITHIC_DEFAULT" overwrite="0">0</set>
+ <option name="WX_MONOLITHIC">
+ <values>0,1</values>
+ <values-description>Multilib,Monolithic</values-description>
+ <default-value>$(WX_MONOLITHIC_DEFAULT)</default-value>
+ <description>
+ Use monolithic build of wxWidgets?
+ </description>
+ </option>
+ </if>
+
<!-- HELPER VARIABLES -->
<!-- -->
-
-
+
+
<!-- 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>
- </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>
+ </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>
</set>
<!-- These are handy ways of dealing with the -->
- <!-- extensions in the library names of the -->
+ <!-- extensions in the library names of the -->
<!-- wxWindows library. -->
<set var="WXLIBPOSTFIX">
<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>
</set>
- <set var="WX3RDPARTLIBPOSTFIX">
+ <set var="WX3RDPARTYLIBPOSTFIX">
<if cond="WX_DEBUG=='1'">d</if>
</set>
+ <set var="WXCPU">
+ <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
+ </set>
+
<set var="WXLIBPATH">
- <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_lib</if>
- <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)_dll</if>
+ <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_lib</if>
+ <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_dll</if>
+ </set>
+
+ <set var="WXPORT">
+ <if cond="FORMAT=='msevc4prj'">wince</if>
+ <if cond="FORMAT!='msevc4prj'">msw</if>
+ </set>
+ <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)$(WXPORT)$(WXLIBPOSTFIX)</set>
+
+
+ <!-- All the possible mixes for the wx library names -->
+ <set var="WXLIB_BASE_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wxbase$(WX_VERSION)</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wxbase$(WX_VERSION)d</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wxbase$(WX_VERSION)u</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wxbase$(WX_VERSION)ud</if>
+
+ <!--
+ the trick used to support monolithic builds is here: when the
+ <wx-lib>base</wx-lib> tag is found, and user selected
+ WX_MONOLITHIC=1, then the base library is translated to the
+ monolithic library
+ -->
+ <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)</if>
+ <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d</if>
+ <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u</if>
+ <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud</if>
+ </set>
+
+ <!-- Libraries whose name is prefixed with 'wxbase' -->
+ <set var="WXLIB_NET_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wxbase$(WX_VERSION)_net</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wxbase$(WX_VERSION)d_net</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wxbase$(WX_VERSION)u_net</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wxbase$(WX_VERSION)ud_net</if>
+ </set>
+ <set var="WXLIB_XML_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wxbase$(WX_VERSION)_xml</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wxbase$(WX_VERSION)d_xml</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wxbase$(WX_VERSION)u_xml</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wxbase$(WX_VERSION)ud_xml</if>
+ </set>
+ <set var="WXLIB_ODBC_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wxbase$(WX_VERSION)_odbc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wxbase$(WX_VERSION)d_odbc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wxbase$(WX_VERSION)u_odbc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wxbase$(WX_VERSION)ud_odbc</if>
+ </set>
+
+ <!-- Libraries whose name is prefixed with 'wx' only -->
+ <set var="WXLIB_CORE_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_core</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_core</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_core</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_core</if>
</set>
+ <set var="WXLIB_MEDIA_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_media</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_media</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_media</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_media</if>
+ </set>
+ <set var="WXLIB_XRC_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_xrc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_xrc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_xrc</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_xrc</if>
+ </set>
+ <set var="WXLIB_HTML_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_html</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_html</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_html</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_html</if>
+ </set>
+ <set var="WXLIB_ADV_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_adv</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_adv</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_adv</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_adv</if>
+ </set>
+ <set var="WXLIB_QA_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_qa</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_qa</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_qa</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_qa</if>
+ </set>
+ <set var="WXLIB_DBGRID_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_dbgrid</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_dbgrid</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_dbgrid</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_dbgrid</if>
+ </set>
+ <set var="WXLIB_GL_NAME">
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)_gl</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)d_gl</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WXPORT)$(WX_VERSION)u_gl</if>
+ <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WXPORT)$(WX_VERSION)ud_gl</if>
+ </set>
+
+
+
+
+
- <set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)msw$(WXLIBPOSTFIX)</set>
-
-
<!-- WX TEMPLATE -->
<!-- -->
<!-- -->
<!-- libraries required by the platform, the libraries -->
<!-- we want for our stuff, and the wxWindows libs. -->
-
-
<!-- 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>
- <if cond="value in ['net','xml', 'odbc']">
- <sys-lib>wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
+ <if cond="value=='base'"><sys-lib>$(WXLIB_BASE_NAME)</sys-lib></if>
+ <if cond="value=='core'"><sys-lib>$(WXLIB_CORE_NAME)</sys-lib></if>
+
+ <if cond="value=='net'"><sys-lib>$(WXLIB_NET_NAME)</sys-lib></if>
+ <if cond="value=='xml'"><sys-lib>$(WXLIB_XML_NAME)</sys-lib></if>
+ <if cond="value=='odbc'"><sys-lib>$(WXLIB_ODBC_NAME)</sys-lib></if>
+
+ <if cond="value=='media'"><sys-lib>$(WXLIB_MEDIA_NAME)</sys-lib></if>
+ <if cond="value=='xrc'"><sys-lib>$(WXLIB_XRC_NAME)</sys-lib></if>
+ <if cond="value=='html'"><sys-lib>$(WXLIB_HTML_NAME)</sys-lib></if>
+ <if cond="value=='adv'"><sys-lib>$(WXLIB_ADV_NAME)</sys-lib></if>
+ <if cond="value=='gl'"><sys-lib>$(WXLIB_GL_NAME)</sys-lib></if>
+ <if cond="value=='dbgrid'"><sys-lib>$(WXLIB_DBGRID_NAME)</sys-lib></if>
+ <if cond="value=='qa'"><sys-lib>$(WXLIB_QA_NAME)</sys-lib></if>
+
+ <!-- wx-lib can be used also to link against contrib libraries
+ (which always have the same name, regardless of WX_MONOLITHIC value) -->
+ <if cond="value in CONTRIBLIB_LIST.split()">
+ <sys-lib>wx$(WXPORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
</if>
- <if cond="value not in ['base','net','xml']">
- <sys-lib>wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
+
+ <if cond="value not in ALLLIB_LIST.split()">
+ <error>Unknown wxWidgets library given in the wx-lib tag</error>
</if>
</define-tag>
position="before:__wx-libs-point"/>
<tag-info name="__wx-syslibs"
position="after:__wx-libs-point"/>
-
+
<!-- template for static wx libraries: -->
<template id="wx-lib">
<!-- MISCELLANEOUS -->
- <if cond="FORMAT=='mingw'">
+ <if cond="FORMAT=='mingw'">
<define>HAVE_W32API_H</define>
<ldflags>-mthreads</ldflags>
</if>
<define>$(WXUNICODE_DEFINE)</define>
- <define>$(WXDEBUG_DEFINE)</define>
+ <define>$(WXDEBUG_DEFINE)</define>
<define>__WXMSW__</define>
<include>$(WX_DIR)$(WXLIBINCLUDE)</include>
<include>$(WX_DIR)/include</include>
</template>
-
-
+
+
<!-- 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">
<!-- wx 3rd party libs, always use them: -->
- <sys-lib>wxtiff$(WX3RDPARTLIBPOSTFIX)</sys-lib>
- <sys-lib>wxjpeg$(WX3RDPARTLIBPOSTFIX)</sys-lib>
- <sys-lib>wxpng$(WX3RDPARTLIBPOSTFIX)</sys-lib>
- <sys-lib>wxzlib$(WX3RDPARTLIBPOSTFIX)</sys-lib>
- <!-- For regex we won't use the WX3RDPARTLIBPOSTIX postfix:
+ <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:
unliked tiff, jpeg, png, zlib, expat, when building
in Unicode mode, the "u" suffix is appended to regex -->
- <sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib>
- <sys-lib>wxexpat$(WX3RDPARTLIBPOSTFIX)</sys-lib>
-
+ <sys-lib cond="FORMAT!='msevc4prj'">wxregex$(WXLIBPOSTFIX)</sys-lib>
+ <sys-lib>wxexpat$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
+
<!-- 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>
+ <sys-lib>odbc32</sys-lib>
</if>
<!-- Non-borland, on the other hand... -->
- <if cond="FORMAT!='borland'">
+ <if cond="FORMAT not in ['borland','msevc4prj']">
<sys-lib>kernel32</sys-lib>
<sys-lib>user32</sys-lib>
<sys-lib>gdi32</sys-lib>
<sys-lib>oleacc</sys-lib>
</if>
</define-tag>
-
+
<!-- template for wx executables/dlls: -->
<template id="wx" template="wx-lib">
<lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>