# (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 ; # windows only, practically

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)
free-feature tag ;

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

# The addressing model to generate code for.
# Currently a limited set only specifying the bit size of pointers.
feature address-model : default 16 32 64 ;

# Type of CPU architecture to compile for.
feature architecture :
    # The default is the machine we are on, i.e. nothing
    native
    # x86 and compatible
    x86
    # Sparc
    sparc
    # RS/6000 & PowerPC
    power
    # MIPS/SGI
    mips1 mips2 mips3 mips4
    ;

# The specific instruction set in an architecture to compile.
feature instruction-set :
    # Default should probably always be the lowest common denominator.
    default
    # x86 and compatible
    i386 i486 i586 i686 pentium pentium-mmx pentiumpro pentium2 pentium3 pentium4
    k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp
    # 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 power64
    403 505 801 821 823 860
    power-common
    # MIPS
    r2000 r3000 r3900 r4000 r4100 r4300 r4400 r4600 r4650 r5000 r6000 r8000 orion
    ;

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

gALWAYS_RELEVANT = <target-type> <tag> ;

##### 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
    <wide-character-support>on
    <exception-handling>on
    <rtti>on
    <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"
    
    <address-model>default
    <architecture>native
    <instruction-set>default
    ;
    
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
    <debug-symbols>on
    ;

