+ <set var="DIR_SUFFIX_CPU">
+ <if cond="FORMAT=='msevc4prj'">_$(CPU)</if>
+ <if cond="TARGET_CPU=='amd64'">_amd64</if>
+ <if cond="TARGET_CPU=='AMD64'">_amd64</if>
+ <if cond="TARGET_CPU=='ia64'">_ia64</if>
+ <if cond="TARGET_CPU=='IA64'">_ia64</if>
+ </set>
+
+ <if cond="FORMAT!='autoconf'">
+ <set var="WXDLLFLAG">
+ <if cond="SHARED=='1'">dll</if>
+ </set>
+ <set var="CFG_NAME_PART">
+ $(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
+ </set>
+ <set var="OBJS" make_var="1">
+ <if cond="FORMAT!='cbuilderx'">
+ $(COMPILER)_$(CFG_NAME_PART)$(DIR_SUFFIX_CPU)
+ </if>
+ <!-- FIXME: waiting for removal after CBX has better ../ dirs
+ support -->
+ <if cond="FORMAT=='cbuilderx'">build_cbx_$(CFG_NAME_PART)</if>
+ </set>
+
+ <set var="BUILDDIR">$(OBJS)</set>
+ </if>
+
+ <set var="LIBTYPE_SUFFIX" make_var="1">
+ <if cond="FORMAT!='autoconf' and SHARED=='0' and PLATFORM_WIN32=='1'">lib</if>
+ <if cond="FORMAT!='autoconf' and SHARED=='1' and PLATFORM_WIN32=='1'">dll</if>
+ <if cond="FORMAT=='watcom' and SHARED=='0' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_lib</if>
+ <if cond="FORMAT=='watcom' and SHARED=='1' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_dll</if>
+ </set>
+
+ <set var="LIBDIRNAME" make_var="1">
+ <if cond="FORMAT=='autoconf'">$(top_builddir)lib</if>
+ <if cond="FORMAT!='autoconf'">
+ $(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
+ </if>
+ </set>
+
+ <if cond="FORMAT!='autoconf'">
+ <set var="SETUPHDIR" make_var="1">
+ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
+ </set>
+ </if>
+
+
+
+ <!-- =============================================================== -->
+ <!-- Templates for libs: -->
+ <!-- =============================================================== -->
+
+ <set var="DEBUGINFO">
+ <if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
+ <if cond="DEBUG_INFO=='1'">on</if>
+ <if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
+ <if cond="DEBUG_INFO=='0'">off</if>
+ </set>
+ <set var="DEBUGRUNTIME">
+ <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if>
+ <if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if>
+ <if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
+ <if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
+ </set>
+ <set var="OPTIMIZEFLAG">
+ <if cond="BUILD=='debug'">off</if>
+ <if cond="BUILD=='release'">speed</if>
+ </set>
+ <set var="EXCEPTIONSFLAG">
+ <if cond="USE_EXCEPTIONS=='1'">on</if>
+ <if cond="USE_EXCEPTIONS=='0'">off</if>
+ </set>
+ <set var="RTTIFLAG">
+ <if cond="USE_RTTI=='1'">on</if>
+ <if cond="USE_RTTI=='0'">off</if>
+ </set>
+ <set var="THREADSFLAG">
+ <if cond="USE_THREADS=='1'">multi</if>
+ <if cond="USE_THREADS=='0'">single</if>
+ </set>
+
+ <set var="RTTI_DEFINE">
+ <if cond="USE_RTTI=='0'">wxNO_RTTI</if>
+ </set>
+ <set var="EXCEPTIONS_DEFINE">
+ <if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if>
+ </set>
+ <set var="THREAD_DEFINE">
+ <if cond="USE_THREADS=='0'">wxNO_THREADS</if>
+ </set>
+
+ <set var="DEBUG_DEFINE">
+ <if cond="FORMAT!='autoconf' and BUILD=='debug' and DEBUG_FLAG=='default'">__WXDEBUG__</if>
+ <if cond="FORMAT!='autoconf' and DEBUG_FLAG=='1'">__WXDEBUG__</if>
+ </set>
+ <!-- does not cover all cases, but better than nothing -->
+ <set var="NO_VC_CRTDBG">
+ <if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
+ <if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
+ </set>
+ <set var="UNICODE_DEFINE">
+ <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
+ </set>
+ <set var="MSLU_DEFINE">
+ <if cond="FORMAT!='autoconf' and MSLU=='1'">wxUSE_UNICODE_MSLU=1</if>
+ </set>
+
+ <!-- fill for the specific case of the format/compiler -->
+ <set var="WIN32_WINNT">
+ <if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
+ </set>
+
+ <set var="UNICOWS_LIB">
+ <if cond="MSLU=='1'">unicows</if>
+ </set>
+
+ <set var="LINK_TARGET_CPU">
+ <if cond="TARGET_CPU=='amd64'">/MACHINE:AMD64</if>
+ <if cond="TARGET_CPU=='AMD64'">/MACHINE:AMD64</if>
+ <if cond="TARGET_CPU=='ia64'">/MACHINE:IA64</if>
+ <if cond="TARGET_CPU=='IA64'">/MACHINE:IA64</if>
+ </set>
+
+ <template id="common_settings">
+ <debug-info>$(DEBUGINFO)</debug-info>
+ <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
+ <optimize>$(OPTIMIZEFLAG)</optimize>
+ <threading>$(THREADSFLAG)</threading>
+ <runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
+ <cxx-rtti>$(RTTIFLAG)</cxx-rtti>
+ <cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
+ <if cond="FORMAT!='autoconf'">
+ <cppflags>$(EXTRACFLAGS)</cppflags>
+ </if>
+ <define>$(NO_VC_CRTDBG)</define>
+ <define>$(WIN32_WINNT)</define>
+ <if cond="FORMAT=='msevc4prj' and
+ BAKEFILE_VERSION in ['0.1.9'] and
+ USE_RTTI=='0'">
+ <!-- hack to make eVC4 2.6.2 project files compatible with what we had in 2.6.1 -->
+ <set var="_ldlibs">$(_ldlibs.replace('ccrtrtti.lib', ''))</set>
+ <set var="_cppflags">$(_cppflags.replace('/GR', ''))</set>
+ </if>
+ <if cond="FORMAT=='msvc'">
+ <ldflags>$(LINK_TARGET_CPU)</ldflags>
+ </if>
+ </template>
+
+ <template id="anylib">
+ <dirname>$(LIBDIRNAME)</dirname>
+ <install-to>$(LIBDIR)</install-to>
+ </template>
+
+ <template id="3rdparty_lib" template="common_settings,anylib">
+ <if cond="FORMAT=='autoconf'">
+ <libname>$(id)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
+ </if>
+ <if cond="FORMAT!='autoconf'">
+ <libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
+ </if>
+ <!--
+ we want to install 3rd party libs system-wide only with static
+ version of wxWidgets; otherwise they are embedded in shared libs:
+ -->
+ <install-if>SHARED=='0'</install-if>
+ <pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
+ </template>
+
+
+ <!-- deal with the need to copy setup.h here: -->
+
+ <set var="IS_MSVC_PRJ">$(FORMAT in ['msvc6prj','msevc4prj'])</set>
+
+ <define-tag name="msvc-headers" rules="dll,lib">
+ <if cond="IS_MSVC_PRJ">
+ <!-- FIXME: remove this once we require >=bkl-0.1.9 -->
+ <if cond="BAKEFILE_VERSION in ['0.1.7', '0.1.8']">
+ <msvc-project-files>
+ $(addPrefixToList('include\', wxwin.headersOnly(value)))
+ </msvc-project-files>
+ </if>
+ <if cond="BAKEFILE_VERSION not in ['0.1.7', '0.1.8']">
+ <msvc-project-files>
+ $(addPrefixToList('include\\', wxwin.headersOnly(value)))
+ </msvc-project-files>
+ </if>
+ </if>
+ </define-tag>
+
+ <set var="msvc_copy_setup_h_script">
+ <if cond="IS_MSVC_PRJ">
+Creating $(SETUPHDIR)\wx\setup.h
+InputPath=..\include\wx\%s
+
+"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
+$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
+ </if>