# (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 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 user-interface : console gui ;

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

free-feature cflags ;
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 ;

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

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

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

##### Variant definitions ####
COMMON_PROPERTIES ?= 
    <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
    ;
    
variant debug :
    $(COMMON_PROPERTIES)
    <profiling>off
    <debug-symbols>on
    <runtime-build>debug
    <optimization>off
    <inlining>off
    ;

variant debug-python :
    $(COMMON_PROPERTIES)
    <profiling>off
    <debug-symbols>on
    <runtime-build>debug
    <define>BOOST_DEBUG_PYTHON
    <optimization>off
    <inlining>off
    ;

variant release : 
    $(COMMON_PROPERTIES)
    <profiling>off
    <debug-symbols>off
    <runtime-build>release
    <optimization>speed
    <inlining>full
    <define>NDEBUG
    ;

# Profiling variant by Toon Knapen <toon@si-lab.com>
variant profile :
    $(COMMON_PROPERTIES)
    <debug-symbols>off
    <profiling>on
    <runtime-build>release
    <optimization>speed
    <inlining>full
    <define>NDEBUG
    ;

