#
#  This file is part of MUMPS 5.9.0, released
#  on Tue Apr 28 13:05:59 UTC 2026
#
# We are grateful to Evgenii Rudnyi for his help and suggestions
# regarding Windows installation.
#Begin orderings

# NOTE that PORD is distributed within MUMPS by default. It is recommended to
# install other orderings. For that, you need to obtain the corresponding package
# and modify the variables below accordingly.
# For example, to have Metis available within MUMPS:
#          1/ download Metis and compile it
#          2/ uncomment (suppress # in first column) lines
#             starting with LMETISDIR,  LMETIS,  PATHMETIS
#          3/ add -Dmetis in line ORDERINGSF
#             ORDERINGSF  = -Dpord -Dmetis
#          4/ Compile and install MUMPS
#             make clean; make   (to clean up previous installation)
#
#          Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 6.0 and later) orderings are recommended.
#

#SCOTCHDIR  = ${HOME}/scotch_6.0
#PATHSCOTCH = -LIBPATH:$(SCOTCHDIR)/lib
#ISCOTCH    = -I$(SCOTCHDIR)/include
#
# You have to choose one among the following two lines depending on
# the type of analysis you want to perform. If you want to perform only
# sequential analysis choose the first (remember to add -Dscotch in the ORDERINGSF
# variable below); for both parallel and sequential analysis choose the second 
# line (remember to add -Dptscotch in the ORDERINGSF variable below)

#LSCOTCH    = libscotch.lib libscotcherr.lib libesmumps.lib
#LSCOTCH    = libptscotch.lib libptscotcherr.lib libptesmumps.lib libscotch.lib


LPORDDIR = $(topdir)/PORD/lib/
IPORD    = -I$(topdir)/PORD/include/
PATHPORD = -LIBPATH:$(LPORDDIR)
LPORD    = libpord$(PLAT).lib

#LMETISDIR = /opt/metis-5.1.0/build/Linux-x86_64/libmetis
#PATHMETIS = -LIBPATH:$(LMETISDIR)
#IMETIS    = /opt/metis-5.1.0/include

# You have to choose one among the following two lines depending on
# the type of analysis you want to perform. If you want to perform only
# sequential analysis choose the first (remember to add -Dmetis in the ORDERINGSF
# variable below); for both parallel and sequential analysis choose the second 
# line (remember to add -Dparmetis in the ORDERINGSF variable below)

#LMETIS    = libmetis.lib
#LMETIS    = libparmetis.lib libmetis.lib

# The following variables will be used in the compilation process.
# Please note that -Dptscotch and -Dparmetis imply -Dscotch and -Dmetis respectively.
# If you want to use Metis 4.X or an older version, you should use -Dmetis4 instead of -Dmetis
# or in addition with -Dparmetis (if you are using parmetis 3.X or older).
#ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
ORDERINGSF  = -Dpord
ORDERINGSC  = $(ORDERINGSF)

PATHORDERINGS = $(PATHMETIS) $(PATHPORD) $(PATHSCOTCH)
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
IORDERINGSF = $(ISCOTCH)
IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)

# For Windows
#End orderings
########################################################################
########################################################################
################################################################################

PLAT    =
LIBEXT  = .lib
LIBEXT_SHARED  = .so
SONAME = -soname
SHARED_OPT = -shared
#FPIC_OPT = -fPIC
#RPATH_OPT
OUTC    = -Fo
OUTF    = -Fo
RM      = /bin/rm -f
CC      = cl
FC      = ifort
FL      = ifort
AR      = lib -out:
#RANLIB = ranlib
RANLIB  = echo
INCSEQ  = -I$(topdir)/libseq
LIBSEQ  = $(topdir)/libseq/libmpiseq$(PLAT).lib
#LIBBLAS = -L/usr/lib/xmm/ -lf77blas -latlas
#LIBBLAS = -L/local/BLAS -lblas
LIBBLAS = mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib
#LIBOTHERS = -lpthread
LIBOTHERS = -link $(PATHORDERINGS)
#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
CDEFS   = -DAdd_

#Begin Optimized options
OPTF    = -O -MD -Dintel_ -DGEMMT_AVAILABLE -fpp
OPTL    = 
OPTC    = -O2 -MD
#End Optimized options
INCS = $(INCSEQ)
LIBS = $(LIBSEQ)
LIBSEQNEEDED = libseqneeded
