# -*- 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 hints 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');
#
#   * link            : name assigned to the link flags (see 'stages');
#
#   * modifiers       : list of keywords associated to specific flags
#                       (mandatory); each keyword must be an option of
#                       the same section set to the name of the
#                       corresponding flags;
#
#   * 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;
#       * xpre : when preprocessing with an external preprocessor;
#
#   * system_test     : shell variable containing the system
#                       specifications (mandatory);
#
#   * vendor_test     : shell variable containing the vendor of the
#                       build tool (mandatory);
#
#   * vendors         : supported vendors for the selected build tool
#                       (mandatory);
#
#   * version_test    : shell variable containing the version of the
#                       build tool (mandatory).
#

# WARNING: modify the defaults with *extreme* care!
[DEFAULT]
modifiers = bits_32 bits_64
stages = prep comp link
vendors = gnu
system_test = abi_sys_spec

# Archiver
[ar]
stages = arch
vendors = ibm
bits_32 = ARFLAGS_32BITS
bits_64 = ARFLAGS_64BITS
arch = ARFLAGS_HINTS
vendor_test = abi_ar_vendor
version_test = abi_ar_version

# External C preprocessor
[cpp]
stages = xpre
vendors = default ibm
bits_32 = CPPFLAGS_32BITS_EXT
bits_64 = CPPFLAGS_64BITS_EXT
xpre = CPPFLAGS_HINTS_EXT
vendor_test = abi_cpp_vendor
version_test = abi_cpp_version

# C compiler
[cc]
modifiers = bits_32 bits_64 pic
vendors = compaq open64 gnu ibm intel pathscale pgi
bits_32 = CFLAGS_32BITS
bits_64 = CFLAGS_64BITS
pic = CFLAGS_PIC
prep = CPPFLAGS_HINTS
comp = CFLAGS_HINTS
link = CC_LDFLAGS_HINTS
vendor_test = abi_cc_vendor
version_test = abi_cc_version

# External C++ preprocessor
[xpp]
stages = xpre
vendors = default ibm
bits_32 = XPPFLAGS_32BITS_EXT
bits_64 = XPPFLAGS_64BITS_EXT
xpre = XPPFLAGS_HINTS_EXT
vendor_test = abi_xpp_vendor
version_test = abi_xpp_version

# C++ compiler
[cxx]
modifiers = bits_32 bits_64 pic
vendors = compaq open64 gnu ibm intel pathscale
bits_32 = CXXFLAGS_32BITS
bits_64 = CXXFLAGS_64BITS
pic = CXXFLAGS_PIC
prep = XPPFLAGS_HINTS
comp = CXXFLAGS_HINTS
link = CXX_LDFLAGS_HINTS
vendor_test = abi_cxx_vendor
version_test = abi_cxx_version

# External Fortran preprocessor
[fpp]
stages = xpre
vendors = default ibm
bits_32 = FPPFLAGS_32BITS_EXT
bits_64 = FPPFLAGS_64BITS_EXT
xpre = FPPFLAGS_HINTS_EXT
vendor_test = abi_fpp_vendor
version_test = abi_fpp_version

# Fortran compiler
[fc]
modifiers = big_endian bits_32 bits_64 fixed free moddir pic openmp
vendors = absoft amd compaq fujitsu g95 gnu hitachi ibm intel mipspro nag pathscale sun open64 pgi
big_endian = FCFLAGS_BIGENDIAN
bits_32 = FCFLAGS_32BITS
bits_64 = FCFLAGS_64BITS
fixed = FCFLAGS_FIXEDFORM
free = FCFLAGS_FREEFORM
moddir = FCFLAGS_MODDIR
pic = FCFLAGS_PIC
openmp = FCFLAGS_OPENMP
prep = FPPFLAGS_HINTS
comp = FCFLAGS_HINTS
link = FC_LDFLAGS_HINTS
vendor_test = abi_fc_vendor
version_test = abi_fc_version

