#
#  This file is part of MUMPS 4.8.3, built on Wed Sep 24 17:11:30 UTC 2008
#
################################################################################
#
#   Makefile.inc.generic
#
#   This defines some parameters dependent on your platform; you should
#   look for the approriate file in the directory ./Make.inc/ and copy it
#   into a file called Makefile.inc. For example, from the MUMPS root
#   directory, use 
#   "cp Make.inc/Makefile.inc.generic ./Makefile.inc"
#   (see the main README file for details)
#
#   If you do not find any suitable Makefile in Makefile.inc, use this file:
#   "cp Make.inc/Makefile.inc.generic ./Makefile.inc" and modify it according
#   to the comments given below. If you manage to build MUMPS on a new platform,
#   and think that this could be useful to others, you may want to send us
#   the corresponding Makefile.inc file.
#
################################################################################


#Begin orderings
# NOTE that PORD is distributed within MUMPS by default. If you would like to
# use other orderings, 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
#          3/ add -Dmetis in line ORDERINGSF
#             ORDERINGSF  = -Dpord -Dmetis
#          4/ Compile MUMPS 
#             make clean; make   (to clean up previous installation)
#
#          Metis is now available as an internal ordering for MUMPS.


#LSCOTCHDIR = $(HOME)/JY/emilio/bin/generic
#LSCOTCH   = -L$(LSCOTCHDIR) -lesmumps  -lfax -lorder -lscotch -lsymbol -ldof -lgraph -lcommon -lm

LPORDDIR = ../PORD/lib/
IPORD    = -I../PORD/include/
LPORD    = -L$(LPORDDIR) -lpord

#LMETISDIR = Directory containing Metis library
#IMETIS    = # Metis doesn't need include files (Fortran interface avail.)
#LMETIS    = -L$(LMETISDIR) -lmetis

# Corresponding variables reused later
#ORDERINGS = -Dmetis -Dpord
ORDERINGSF  = -Dpord
ORDERINGSC  = $(ORDERINGSF)
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
IORDERINGS = $(IMETIS) $(IPORD) $(ISCOTCH)

#End orderings
########################################################################
# DEFINE HERE SOME COMMON COMMANDS, THE COMPILER NAMES, ETC...

# PLAT : use it to add a default suffix to the generated libraries
PLAT    = 
# RM : remove files
RM      = /bin/rm -f
# CC : C compiler
CC      = cc
# FC : Fortran 90 compiler
FC      = f90
# FL : Fortran linker
FL      = f90
# AR : Archive object in a library
AR      = ar vr
# RANLIB : generate index of an archive file
#   (optionnal use "RANLIB = echo" in case of problem)
RANLIB  = ranlib
#RANLIB  = echo

# SCALAP should define the SCALAPACK and  BLACS libraries.
SCALAP  = -lscalapack -lblacs

# INCLUDE DIRECTORY FOR MPI
INCPAR  = -I/usr/include

# LIBRARIES USED BY THE PARALLEL VERSION OF MUMPS: $(SCALAP) and MPI
LIBPAR  = $(SCALAP) -L/usr/lib -lmpi

# The parallel version is not concerned by the next two lines.
# They are related to the sequential library provided by MUMPS,
# to use instead of ScaLAPACK and MPI.
INCSEQ  = -I../libseq
LIBSEQ  = -L../libseq -lmpiseq

# DEFINE HERE YOUR BLAS LIBRARY

LIBBLAS = -lblas

# DEFINE YOUR PTHREAD LIBRARY
LIBOTHERS = -lpthread

# FORTRAN/C COMPATIBILITY:
#  Use:
#    -DAdd_ if your Fortran compiler adds an underscore at the end
#              of symbols,
#     -DAdd__ if your Fortran compiler adds 2 underscores,
#
#     -DUPPER if your Fortran compiler uses uppercase symbols
#
#     leave empty if your Fortran compiler does not change the symbols.
#

CDEFS = -DAdd_

#COMPILER OPTIONS
OPTF    = -O
OPTC    = -O -I.
OPTL    = -O

# CHOOSE BETWEEN USING THE SEQUENTIAL OR THE PARALLEL VERSION.

#Sequential:
#INC = $(INCSEQ)
#LIB = $(LIBSEQ)
#LIBSEQNEEDED = libseqneeded

#Parallel:
INC = $(INCPAR)
LIB = $(LIBPAR)
LIBSEQNEEDED = 

