b advapi32.lib user32.lib $(--python-lib[1]) ;
toolset vc14 cl : /Fe /Fe /Fd /Fo : -D
    : /nologo
    [ opt --release : /GL /MT /O2 /Ob2 /Gy /GF /GA /wd4996 ]
    [ opt --debug : /MTd /DEBUG /Z7 /Od /Ob0 /wd4996 ]
    -I$(--python-include) -I$(--extra-include)
    : kernel32.lib advapi32.lib user32.lib $(--python-lib[1]) ;

# First set the build commands and options according to the
# preset toolset.
toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
if ! $(toolset)
{
    # For some reason, the following test does not catch empty toolset.
    ECHO "###" ;
    ECHO "###" No toolset specified. Please use --toolset option. ;
    ECHO "###" ;
    ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
    EXIT "###" ;
}
if ! $(toolset) in $(toolsets)
{
    ECHO "###" ;
    ECHO "###" Unknown toolset: $(toolset) ;
    ECHO "###" ;
    ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
    EXIT "###" ;
}
--cc = $(tool.$(toolset).cc) ;
if $(tool.$(toolset).opt.out[2])
{
    if $(tool.$(toolset).opt.out[1]) = $(tool.$(toolset).opt.out[2])
    {
        --out = $(tool.$(toolset).opt.out[1]) ;
        --dir = $(tool.$(toolset).opt.out[3-]) ;
    }
    else
    {
        --bin = $(tool.$(toolset).opt.out[1]) ;
        --dir = $(tool.$(toolset).opt.out[2-]) ;
    }
}
else
{
    --out = $(tool.$(toolset).opt.out) ;
}
--def = $(tool.$(toolset).opt.define) ;
--flags = $(tool.$(toolset).flags) ;
--defs = $(tool.$(toolset).defines) ;
--libs = $(tool.$(toolset).linklibs) ;
if $(tool.$(toolset).link.cc)
{
    --link = $(tool.$(toolset).link.cc) ;
    if $(tool.$(toolset).link.opt.out[2])
    {
        if $(tool.$(toolset).link.opt.out[1]) = $(tool.$(toolset).link.opt.out[2])
        {
            --link-out = $(tool.$(toolset).link.opt.out[1]) ;
            --link-dir = $(tool.$(toolset).link.opt.out[3-]) ;
        }
        else
        {
            --link-bin = $(tool.$(toolset).link.opt.out[1]) ;
            --link-dir = $(tool.$(toolset).link.opt.out[2-]) ;
        }
    }
    else
    {
        --link-out = $(tool.$(toolset).link.