<makefile>
- <!-- 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. -->
- <!-- For other compilers a separate configuration -->
- <!-- file is created (such as config.gcc on gcc) -->
- <!-- which has several options a user can modify. -->
+ <!-- OPTIONS -->
<!-- -->
- <!-- Note that the above only happens if an option -->
- <!-- is not constant, i.e. if it cannot be determined -->
- <!-- by bakefile itself. -->
- <!-- Also note that for 'autoconf' format these options -->
- <!-- are only useful when used together with wxpresets.m4 -->
- <!-- macro file which contains macros for detecting the -->
- <!-- option values for wx-based projects. See wxpresets.m4 -->
- <!-- comments for more info. -->
+
+ <set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL">
+ <!-- 'NORMAL' here refers to the fact that the formats for which
+ FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL==1 only need
+ additional compiler and/or linker flags (see e.g. WXMACHINE_FLAG)
+ -->
+ <if cond="FORMAT in ['msvc']">1</if>
+ <if cond="FORMAT not in ['msvc']">0</if>
+ </set>
+ <set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS">
+ <!-- the formats for which FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS==1
+ need special handling: see the docs of the MSVS_PLATFORMS variable in Bakefile docs.
+ -->
+ <if cond="FORMAT in ['msvs2005prj','msvs2008prj']">1</if>
+ <if cond="FORMAT not in ['msvs2005prj','msvs2008prj']">0</if>
+ </set>
+ <set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES">
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1'">1</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1'">1</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='0' and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='0'">0</if>
+ </set>
+
+ <!-- This is a standard option that determines -->
+ <!-- the architecture for which the lib/exe/dll later -->
+ <!-- declared are meant. -->
+ <if cond="not isdefined('TARGET_CPU') and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1'">
+ <set var="TARGET_CPU_DEFAULT" overwrite="0">X86</set>
+ <option name="TARGET_CPU">
+ <values>X86,AMD64,IA64</values>
+ <values-description>i386-compatible,AMD 64 bit,Itanium 64 bit</values-description>
+ <default-value>$(TARGET_CPU_DEFAULT)</default-value>
+ <description>
+ Architecture of the CPU for which to build the executables and libraries
+ </description>
+ </option>
+ </if>
+ <if cond="not isdefined('TARGET_CPU') and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1'">
+ <!-- defining TARGET_CPU also for the formats using the MSVS_PLATFORM variable allows to write
+ easier tests in user bakefiles; e.g.:
+
+ <set var="MY_ARCH_DEPENDENT_VARIABLE">
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='0'">value1</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='X86'">value2</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">value3</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">value4</if>
+ </set>
+ -->
+ <set var="TARGET_CPU">
+ <if cond="MSVS_PLATFORM=='win32'">X86</if>
+ <if cond="MSVS_PLATFORM=='win64'">AMD64</if>
+ <if cond="MSVS_PLATFORM=='ia64'">IA64</if>
+ <!-- MSVS_PLATFORM currently does not support ia64 but this line is still needed by bakefile
+ to correctly set the TARGET_CPU variable -->
+ </set>
+ </if>
<set var="WXCPU">
<if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">_amd64</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">_ia64</if>
</set>
-
+
+ <set var="WXMACHINE_FLAG">
+ <!-- add the /MACHINE linker flag to formats with "normal" multiple-arch support when building in 64bit mode
+ (formats using the MSVS_PLATFORM variable don't need the /MACHINE linker flag!): -->
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='AMD64'">/MACHINE:AMD64</if>
+ <if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='IA64'">/MACHINE:IA64</if>
+ </set>
+
<set var="WXLIBPATH">
- <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_lib</if>
- <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER)$(WXCPU)_dll</if>
+ <if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER_PREFIX)$(WXCPU)_lib</if>
+ <if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER_PREFIX)$(WXCPU)_dll</if>
</set>
-
+
<!-- under Unix this is an option (detected at configure-time);
under Windows this is not an user option! -->
<set var="WX_PORT">
<!-- 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>
+ <if cond="WX_MONOLITHIC=='0'">wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</if>
<!--
the trick used to support monolithic builds is here: when the
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$(WX_PORT)$(WX_VERSION)</if>
- <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='0' and WX_DEBUG=='1'">wx$(WX_PORT)$(WX_VERSION)d</if>
- <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='1' and WX_DEBUG=='0'">wx$(WX_PORT)$(WX_VERSION)u</if>
- <if cond="WX_MONOLITHIC=='1' and WX_UNICODE=='1' and WX_DEBUG=='1'">wx$(WX_PORT)$(WX_VERSION)ud</if>
+ <if cond="WX_MONOLITHIC=='1'">wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)</if>
</set>
<!-- Libraries whose name is prefixed with 'wxbase' -->
<define-global-tag name="define-wxbase-lib-name">
<set var="WXLIB_$(value.upper())_NAME">
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">
- wxbase$(WX_VERSION)_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">
- wxbase$(WX_VERSION)d_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">
- wxbase$(WX_VERSION)u_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">
- wxbase$(WX_VERSION)ud_$(value)
+ <if cond="WX_MONOLITHIC=='0'">
+ wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
</set>
</define-global-tag>
<!-- Libraries whose name is prefixed with 'wx' only -->
<define-global-tag name="define-wxlib-name">
<set var="WXLIB_$(value.upper())_NAME">
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='0'">
- wx$(WX_PORT)$(WX_VERSION)_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='0' and WX_DEBUG=='1'">
- wx$(WX_PORT)$(WX_VERSION)d_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='0'">
- wx$(WX_PORT)$(WX_VERSION)u_$(value)
- </if>
- <if cond="WX_MONOLITHIC=='0' and WX_UNICODE=='1' and WX_DEBUG=='1'">
- wx$(WX_PORT)$(WX_VERSION)ud_$(value)
+ <if cond="WX_MONOLITHIC=='0'">
+ wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
</set>
</define-global-tag>
<define-wxlib-name>adv</define-wxlib-name>
<define-wxlib-name>qa</define-wxlib-name>
<define-wxlib-name>aui</define-wxlib-name>
+ <define-wxlib-name>ribbon</define-wxlib-name>
+ <define-wxlib-name>propgrid</define-wxlib-name>
<define-wxlib-name>stc</define-wxlib-name>
<define-wxlib-name>richtext</define-wxlib-name>
<if cond="value=='adv'"><sys-lib>$(WXLIB_ADV_NAME)</sys-lib></if>
<if cond="value=='qa'"><sys-lib>$(WXLIB_QA_NAME)</sys-lib></if>
<if cond="value=='aui'"><sys-lib>$(WXLIB_AUI_NAME)</sys-lib></if>
+ <if cond="value=='ribbon'"><sys-lib>$(WXLIB_RIBBON_NAME)</sys-lib></if>
+ <if cond="value=='propgrid'"><sys-lib>$(WXLIB_PROPGRID_NAME)</sys-lib></if>
<if cond="value=='richtext'"><sys-lib>$(WXLIB_RICHTEXT_NAME)</sys-lib></if>
<!-- The GL lib isn't part of the monolithic build, treat it as a contrib: -->
<lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>
</if>
+ <ldflags>$(WXMACHINE_FLAG)</ldflags>
+
<!-- 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/>