# Top level PLAPACK directory.  
PLAPACK_ROOT = /space/vzhaboty/PLAPACKR32

# Choose Manufacture  type from following list.
CRAY  = 10
IBM   = 20
INTEL = 30
SUN   = 40
PC    = 50
SGI   = 60
HP    = 70

MANUFACTURE   = $(PC)

# Choose Machine type from above list.
CRAYPVP   = 100
CRAYMPP   = 101
PARAGON   = 200
SP2       = 300
SUNOS     = 400
LINUX     = 500
NT        = 600

MACHINE_TYPE  = $(LINUX)

# Choose Manufacture and Machine type from above list.
MANUFACTURE   = $(PC)
MACHINE_TYPE  = $(LINUX)

# Install a BLAS library or ask your system administrator
# where the BLAS library is installed.
# (for a generic implementation that attains reasonable
# performance see http://www.netlib.org/atlas/.  We hope to
# soon have our own BLAS library.  
# See http://www.cs.utexas.edu/users/plapack/TXBLAS for
# further information.  In addition, check out
# http://www.cs.utk.edu/~ghenry/ for optimized kernels for
# LINUX on Intel platforms.)

BLASLIB = /space/vzhaboty/PLAPACK32/libgoto_p3_256-r0.94.so \
          /space/vzhaboty/PLAPACKR32/xerbla.o \
          /usr/local/blas/lsblaspii1.2f_03.00.a 

LIB = $(BLASLIB) -L/public/lib -static -lm -lc 

CFLAGS = -O3  -I$(PLAPACK_ROOT)/INCLUDE \
         -DMACHINE_TYPE=$(MACHINE_TYPE) -DMANUFACTURE=$(MANUFACTURE)  \
	 -DDEBUG=0 

FFLAGS = -fno-f2c -O3 -Q -I$(PLAPACK_ROOT)/INCLUDE

CC     = mpicc 
FC     = mpif77
AR     = ar
SED    = sed
RANLIB = ranlib
LINKER = mpif77 
LFLAGS = $(CFLAGS)

# If you intend to use the eigensolver or SVD library, 
# install LAPACK or ask your system administrator where to
# find it on your system.  For information see
# http://www.netlib.org/lapack/

SEQ_LAPACK = /usr/local/LAPACK/lapack_LINUX.a \
             /usr/local/LAPACK/tmglib_LINUX.a


PLAPACKLIB =  $(PLAPACK_ROOT)/libPLAPACK.a 
lapackLIB  = $(SEQ_LAPACK) $(BLASLIB)
 
POST_MAKE = chmod ugo+rw *.a

