# 
# This file is part of the SIESTA package.
#
# Copyright (c) Fundacion General Universidad Autonoma de Madrid:
# E.Artacho, J.Gale, A.Garcia, J.Junquera, P.Ordejon, D.Sanchez-Portal
# and J.M.Soler, 1996-2006.
# 
# Use of this software constitutes agreement with the full conditions
# given in the SIESTA license, as signed by all legitimate users.
#
.SUFFIXES:
.SUFFIXES: .f .F .o .a .f90 .F90

SIESTA_ARCH=i686-pc-linux-BEDA-intel12_mkl10.3_impi

FPP=
FPP_OUTPUT= 
FC=mpif90
RANLIB=ranlib

SYS=nag

SP_KIND=4
DP_KIND=8
KINDS=$(SP_KIND) $(DP_KIND)

FFLAGS=-O0
FPPFLAGS=  -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DWXML_INIT_FIX -DMPI -DCDF 

FCFLAGS_fixed_f=
FCFLAGS_free_f90=
FPPFLAGS_fixed_F=
FPPFLAGS_free_F90=


MKL_LIBS=-lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64   -lmkl_intel_lp64 -lmkl_sequential -lmkl_core  -lpthread -lm -lcurl


COMP_LIBS=
NETCDF_LIBS=-L/beda/sw/apps/netcdf/4.1-intel11.1/lib -lnetcdf
NETCDF_INTERFACE=-I/beda/sw/apps/netcdf/4.1-intel11.1/include
#NETCDF_LIBS=-L/beda/users/home/lofas/prog/netcdf-4.1.1-intel10.1/lib -lnetcdf
#NETCDF_INTERFACE=-I/beda/users/home/lofas/prog/netcdf-4.1.1-intel10.1/include
#SIESTA needs an F90 interface to MPI
#This will give you SIESTA's own implementation
#If your compiler vendor offers an alternative, you may change
#to it here.
MPI_INTERFACE=libmpi_f90.a
MPI_INCLUDE=./
 #/beda/users/home/lofas/prog/openmpi-1.4.2-gcc4.4/include #/beda/sw/apps/openmpi/1.4_gcc-4.1/include/
DEFS_MPI=-DMPI
LIBS=$(MKL_LIBS) $(NETCDF_LIBS)
INCFLAGS=$(NETCDF_INTERFACE)
#Dependency rules are created by autoconf according to whether
#discrete preprocessing is necessary or not.
.F.o:
	$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_fixed_F)  $< 
.F90.o:
	$(FC) -c $(FFLAGS) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F90) $< 
.f.o:
	$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_fixed_f)  $<
.f90.o:
	$(FC) -c $(FFLAGS) $(INCFLAGS) $(FCFLAGS_free_f90)  $<


