# (C) Copyright David Abrahams 2001. Permission to copy, use,
# modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided
# "as is" without express or implied warranty, and with no claim as
# to its suitability for any purpose.

# Profiling feature support by Toon Knapen <toon@si-lab.com>.
feature profiling : off on ;

feature struct-alignment : auto 1 2 4 8 16 ;
feature eh-model : default fast msvc ; # metrowerks only
feature vtable-thunks : default on off ; # gcc only

feature threading : single multi ;

feature runtime-link : dynamic static ;
feature runtime-build : debug release ;

feature optimization : off speed space ;
feature inlining : off on full ;
feature debug-symbols : on off : ;
free-feature debug-store : object database ;
free-feature user-interface : console gui ;

feature wide-character-support : on off ;
feature exception-handling : on off ;
feature rtti : on off ;

free-feature cflags ;
free-feature linkflags ;
free-feature cxxflags ;
free-feature define ; # <define>PYTHON=foo
free-feature undef ; # <undef>PYTHON=foo
path-feature "include" ; # <include>../foo/bar/mumble
path-feature library-path ;
dependency-feature library-file ;
free-feature find-library ;
path-feature sysinclude ; # <sysinclude>/fu/man/chu
free-feature arflags ;
free-feature dllversion ; # <dllversion>1.27.0 (for use with soname-ing)

# Can the target participate in a shared library?
feature shared-linkable : false true ;

# Type of CPU architecture to compile for.
feature architecture :
    # The default is the machine we are on, i.e. nothing
    native
    # x86 and compatible
    i386 i486 i586 i686 k6
    # Sparc
    v7 cypress v8 supersparc sparclite hypersparc sparclite86x
    f930 f934 sparclet tsc701 v9 ultrasparc
    # RS/6000 & PowerPC
    rios rios1 rsc rios2 rs64a
    601 602 603 603e 604 604e 620 630 740 750
    power power2 powerpc
    403 505 801 821 823 860
    power-common
    ;

gLINK_COMPATIBLE = <shared-linkable>true <target-type> <inlining> ;

gALWAYS_RELEVANT = <target-type> ;

##### Requirements by target type #####
gTARGET_TYPE_REQUIREMENTS(DLL) = <shared-linkable>true ;

##### Variant definitions ####
COMMON_PROPERTIES ?= 
    <vtable-thunks>default
    <struct-alignment>auto
    <eh-model>default
    <threading>single
    <user-interface>console
    <wide-character-support>on
    <exception-handling>on
    <rtti>on
    <user-interface>console
    <shared-linkable>false
    
    # Borland link lines will need work to find the right libraries for unicode
    # support - see borland-tools.jam 
    <borland><wide-character-support>off
    "<cwpro8><cxxflags>-iso_templates on"
    
    <architecture>native
    ;
    
variant common :
    $(COMMON_PROPERTIES)
    <profiling>off
    ;
    
variant debug : common :
    <debug-symbols>on
    <runtime-build>debug
    <optimization>off
    <inlining>off
    ;

if $(NT)    
{
    variant debug-python : debug :
      <define>BOOST_DEBUG_PYTHON
      <define>_DEBUG
      <gcc><define>Py_DEBUG
      ;
}
else
{
    variant debug-python : debug :
      <define>BOOST_DEBUG_PYTHON
      <define>Py_DEBUG
      ;
    
}

variant release : common :
    <debug-symbols>off
    <runtime-build>release
    <optimization>speed
    <inlining>full
    <define>NDEBUG
    ;

# Profiling variant by Toon Knapen <toon@si-lab.com>
variant profile : release :
    <profiling>on
    ;

