# ----------------------- FCM extract configuration file -----------------------
cfg::type                           bld
cfg::version                        1.0


# ------------------------------------------------------------------------------
# Build information
# ------------------------------------------------------------------------------

#Default value of FPP fortran preprocessor
%FPP cpp

inc arch.fcm
inc config.fcm

%CONFIG_NAME       %{ARCH}%SUFF_NAME
%BASE_CONFIG_PATH  %LIBO/%CONFIG_NAME
%CONFIG_PATH       %BASE_CONFIG_PATH/.config
%SRC_PATH          %LIBF

%FFLAGS            %BASE_FFLAGS %COMPIL_FFLAGS %PARA_FFLAGS
%LD_FLAGS          %BASE_LD %PARA_LD

src::dyn     %SRC_PATH/%DYN
src::phys    %SRC_PATH/%PHYS
src::dyn_phys %DYN_PHYS
src::dyn_phys_sub %DYN_PHYS_SUB
src::inlandsis  %INLANDSIS
src::rad    %RAD
src::dust    %DUST
src::strataer %STRATAER
src::grid    %SRC_PATH/grid
src::filtrez %FILTRE
src::misc    %SRC_PATH/misc
src::dyn3d_common   %DYN_COMMON 
src::phy_common %PHY_COMMON
src::cosp    %COSP
src::ext_src %EXT_SRC
src::Ocean_skin %SRC_PATH/%PHYS/Ocean_skin

bld::lib            lmdz

bld::outfile_ext::exe    %SUFF_NAME
bld::target              liblmdz.a %EXEC%SUFF_NAME
bld::exe_dep             


dir::root            %CONFIG_PATH
#dir::lib             %BASE_CONFIG_PATH
dir::bin             %ROOT_PATH/bin

#search_src           1

bld::tool::fpp       %FPP
bld::tool::fc        %COMPILER 
bld::tool::ld        %LINK
bld::tool::ar        %AR
bld::tool::arflags   %ARFLAGS
bld::tool::make      %MAKE
bld::tool::fflags    %FFLAGS %INCDIR 
bld::tool::ldflags   %LD_FLAGS %LIB  

bld::tool::cppflags  %FPP_FLAGS %INCDIR
bld::tool::fppflags  %FPP_FLAGS %INCDIR
bld::tool::fppkeys   %CPP_KEY %FPP_DEF


# Example of how to set specific compiling options for a specific file
# -> this can be including in the arch.opt file
#bld::tool::fflags::phys::readaerosol         %BASE_FFLAGS %PROD_FFLAGS  %INCDIR -C hopt -pi auto


inc arch.opt

# Pre-process code before analysing dependencies
bld::pp              1


# Ignore the following dependencies
bld::excl_dep        inc::netcdf.inc
bld::excl_dep        use::netcdf
bld::excl_dep        use::typesizes
bld::excl_dep        h::netcdf.inc
bld::excl_dep        h::mpif.h
bld::excl_dep        inc::mpif.h
bld::excl_dep        use::ioipsl
bld::excl_dep        use::intersurf
bld::excl_dep        use::mod_prism_proto
bld::excl_dep        use::mod_prism_def_partition_proto
bld::excl_dep        use::mod_prism_get_proto
bld::excl_dep        use::mod_prism_put_proto
bld::excl_dep        use::mod_prism
bld::excl_dep        use::xios
bld::excl_dep        use::iaxis
bld::excl_dep        use::iaxis_attr
bld::excl_dep        use::icontext_attr
bld::excl_dep        use::idate
bld::excl_dep        use::idomain_attr
bld::excl_dep        use::ifield_attr
bld::excl_dep        use::ifile_attr
bld::excl_dep        use::ixml_tree
# The following for INCA used with CPL
bld::excl_dep        use::incaoasis

# Don't generate interface files
bld::tool::geninterface none

# Allow ".inc" as an extension for CPP include files
bld::infile_ext::inc  CPP::INCLUDE

# extension for module output
bld::outfile_ext::mod .mod
bld::tool::SHELL   /bin/bash
