<?xml version="1.0" ?>
<!--

  This file is part of Bakefile (http://www.bakefile.org)

  Copyright (C) 2003-2007 Vaclav Slavik

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to
  deal in the Software without restriction, including without limitation the
  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  sell copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  IN THE SOFTWARE.

  $Id: win32.bkl 1172 2008-01-13 19:28:12Z vaclavslavik $

-->
<makefile>
    
    <!-- =============================================================== -->
    <!--            Common settings for Windows compilers:               -->
    <!-- =============================================================== -->

    
    <set var="PLATFORM_WIN32">1</set>
    <set var="TOOLSET">win32</set>
    <set var="DIRSEP">\</set>
    <set var="EOL_STYLE">dos</set>
    
    <if cond="FORMAT_HAS_MAKE_INSTALL=='1'">
    

        <!-- Define install dirs in case the user sets the FORMAT_HAS_MAKE_INSTALL
             variable to 1 in his Bakefiles.bkgen file to enable install/uninstall 
             support also under win32
    
             NOTE: since on Windows (unlike e.g. Unix) there are no standard 
                   paths for installing libraries, headers, etc, the bakefile 
                   user which wants to enable installation also under Windows, 
                   should provide valid replacements for PREFIX and EXEC_PREFIX
                   options
        -->
		
		<set var="PREFIX_DEFAULT" overwrite="0">C:\opt</set>
		<set var="EXEC_PREFIX_DEFAULT" overwrite="0">C:\opt\bin</set>
        
        <option name="PREFIX" category="path">
			<default-value>$(PREFIX_DEFAULT)</default-value>
            <description>
                The common installation prefix for header, data and library files
            </description>
        </option>
        <option name="EXEC_PREFIX" category="path">
			<default-value>$(EXEC_PREFIX_DEFAULT)</default-value>
            <description>
                The common installation prefix for binary and DLL files
            </description>
        </option>
        
        <!-- TEMPORARY FIX (FIXME):
             without adding PREFIX and EXEC_PREFIX to VARS_DONT_ELIMINATE these
             two options would be passed to subprojects as expected but their 
             default values would be lost 
        -->
        <set var="VARS_DONT_ELIMINATE" append="1">PREFIX EXEC_PREFIX</set>    
            
        <set var="INCLUDEDIR" eval="0">$(PREFIX)/include</set>
        <set var="DATADIR" eval="0">$(PREFIX)/share</set>
        <set var="LIBDIR" eval="0">$(PREFIX)/lib</set>
    
        <set var="DLLDIR" eval="0">$(EXEC_PREFIX)</set>
        <set var="BINDIR" eval="0">$(EXEC_PREFIX)</set>
    </if> <!-- FORMAT_HAS_MAKE_INSTALL==1 -->
    
	
    <set var="OBJEXT" overwrite="0">.obj</set>
    <set var="LIBEXT">.lib</set>
    <set var="LIBPREFIX"></set>
    <set var="EXEEXT">.exe</set>
    <set var="DLLEXT">.dll</set>
    <set var="DLLEXT_MODULE">.dll</set>
    <set var="DLLIMPEXT">$(LIBEXT)</set>
    <set var="DLLPREFIX"></set>
    <set var="DLLPREFIX_MODULE"></set>
    <set var="PIC_CFLAGS"></set>

    <!-- del command always return success on Windows so the '-' is used here only
         to skip error messages generated when trying to remove nonexistent files -->
    <set var="RM">-del</set>

    <set var="INSTALL_PROGRAM">copy /Y</set>
    <set var="INSTALL_DATA">$(INSTALL_PROGRAM)</set>
    
    <!-- trying to create an existing directory will fail... thus we must ignore
         the return code of Windows' mkdir -->
    <set var="INSTALL_DIR">-mkdir</set>

    <set var="UNINSTALL_PROGRAM">$(RM)</set>
    <set var="UNINSTALL_DATA">$(UNINSTALL_PROGRAM)</set>
    
    <!-- UNINSTALL_DIR is never really used directly by Bakefile -->
    <set var="UNINSTALL_DIR">deltree</set>   

    <!-- for static libraries: -->
    <set var="LIB_PAGESIZE" overwrite="0">4096</set>
    
</makefile>
