# -*- INI -*-
#
# Copyright (C) 2009-2014 ABINIT Group (Yann Pouillon)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#

#
# Configuration file for the optimization options of Abinit
#
# Note: The following statements are in the Python "INI" format, with
#       case-sensitivity activated.
#

#
# Each section represents a programming language
#
# Available options:
#
#   * comp            : name assigned to the compile flags (see 'stages');
#
#   * cpu_vendor_test : shell variable containing the results of CPU
#                       detection (mandatory);
#
#   * cpu_vendors     : supported CPUs for the compiler (mandatory);
#
#   * optim_test      : shell variable containing the status of the
#                       optim mode (mandatory);
#
#   * levels          : supported optimization levels, as defined in
#                       options.conf (mandatory); the order is very
#                       important for the 'mode' option;
#
#   * link            : name assigned to the link flags (see 'stages');
#
#   * mode            : how to treat optimization flags between levels
#                      (mandatory)
#       * append  : build the flags by appending to those of previous levels;
#       * replace : build the flags by replacing those of previous levels;
#
#   * prep            : name assigned to the preprocessing flags
#                      (see 'stages');
#
#   * stages          : build steps where to apply the flags (mandatory)
#       * comp : when compiling;
#       * link : when linking;
#       * prep : when preprocessing;
#
#   * vendor_test     : shell variable containing the compiler vendor
#                       (mandatory);
#
#   * vendors         : supported vendors for the selected language
#                       (mandatory);
#
#   * version_test    : shell variable containing the compiler version
#                       (mandatory).
#

# WARNING: modify the defaults with *extreme* care!
[DEFAULT]
cpu_vendors = amd dec ibm intel sgi
cpu_vendor_test = abi_cpu_spec
levels = safe standard aggressive
mode = replace
optim_test = enable_optim
stages = prep comp link
vendors = gnu

# Language: C
[cc]
vendors = compaq open64 gnu ibm intel pathscale sun
prep = CPPFLAGS_OPTIM
comp = CFLAGS_OPTIM
link = CC_LDFLAGS_OPTIM
vendor_test = abi_cc_vendor
version_test = abi_cc_version

# Language: C++
[cxx]
vendors = compaq open64 gnu ibm intel pathscale sun
prep = CXXCPPFLAGS_OPTIM
comp = CXXFLAGS_OPTIM
link = CXX_LDFLAGS_OPTIM
vendor_test = abi_cxx_vendor
version_test = abi_cxx_version

# Language: Fortran
[fc]
vendors = compaq fujitsu g95 gnu ibm intel mipspro nag open64 pathscale sun pgi
prep = FPPFLAGS_OPTIM
comp = FCFLAGS_OPTIM
link = FC_LDFLAGS_OPTIM
vendor_test = abi_fc_vendor
version_test = abi_fc_version

