# This Makefile.in created by simplemake.  Do not edit

# src/binding/f90/Makefile.  Generated from Makefile.in by configure.

# --------------------------------------------------------------------------
all: all-redirect

SHELL           = /bin/sh
AR              = ar
RANLIB          = ranlib
INSTALL         = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA    = ${INSTALL} -m 644
MKDIR_P         = mkdir -p
master_top_srcdir  = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1
srcdir          = .
abs_srcdir      = /proj/tpfimos/larour/Libraries/linux/mpich2-1.0.2p1/src/binding/f90
prefix          = /proj/tpfimos/larour/Libraries/linux/mpich2-gnu/
exec_prefix     = ${prefix}
includedir      = ${prefix}/include
libdir          = ${exec_prefix}/lib
MPILIBNAME      = mpich
PMPILIBNAME     = pmpich

F90              = f95
F90FLAGS        = -g -O2
F90_COMPILE     = $(F90) $(F90FLAGS) $(F90INCLUDES)

VPATH = .
MOD              = mod
MPIMOD           = mpi
F90INCFLAG       = -I
F90EXT           = f90
F90_COMPILE_MODS = $(F90_COMPILE) 
F90INCLUDES = -I.
doc_sources = mpif90.txt manf90.txt

.SUFFIXES:
.SUFFIXES: .o .f90 .o 
.f90.o:
	$(F90_COMPILE) -c $<
.f90:
	$(F90_COMPILE) -o $* $< $(LDFLAGS) $(LIBS)
clean: clean-local
	-@rm -f *.o ${srcdir}/*.o 
	-@rm -f .libstamp0 
	-@rm -f *.lo ${srcdir}/*.lo
distclean: clean distclean-local distclean-xxx remove-makefile
distclean-xxx:
	-@rm -f Makefile
	-@rm -rf autom4te*.cache
	-@rm -rf $(DEPS_DIR)
	-@rm -f TAGS
remove-makefile:
	rm -f Makefile
remove-genmakefiles:
	rm -f  Makefile
all-redirect: all-preamble lib${MPILIBNAME}f90.a
	${MAKE} all-postamble

lib${MPILIBNAME}f90.a: mpi.o 
	${AR} cr lib${MPILIBNAME}f90.a $?
	${RANLIB} lib${MPILIBNAME}f90.a
# --------------------------------------------------------------------------
# Install target
install: FORCE_TARGET 
	if [ ! -d ${prefix} ] ; then $(MKDIR_P) ${prefix} ; fi
	if [ ! -d ${includedir} ] ; then $(MKDIR_P) ${includedir} ; fi
	$(INSTALL_DATA) $(MPIMOD).$(MOD) ${includedir}/$(MPIMOD).$(MOD)
	if [ ! -d ${exec_prefix} ] ; then $(MKDIR_P) ${exec_prefix} ; fi
	if [ ! -d ${libdir} ] ; then $(MKDIR_P) ${libdir} ; fi
	$(INSTALL_DATA) lib${MPILIBNAME}f90.a ${libdir}/lib${MPILIBNAME}f90.a
	if [ -s mpimod.pcl ] ; then $(INSTALL_DATA) mpimod.pcl ${includedir}/mpimod.pcl ; fi
	if [ -s mpimod.pc ] ; then $(INSTALL_DATA) mpimod.pc ${includedir}/mpimod.pc ; fi

install-strip:
	$(MAKE) INSTALL_STRIP_FLAG=-s install
uninstall:
	-rm -f ${includedir}/$(MPIMOD).$(MOD)
	-rm -f ${libdir}/lib${MPILIBNAME}f90.a
	-rm -f ${includedir}/mpimod.pcl
	-rm -f ${includedir}/mpimod.pc
installcheck:
# --------------------------------------------------------------------------
dependencies:
# --------------------------------------------------------------------------
tags: TAGS
TAGS:
# --------------------------------------------------------------------------

# We need to tell some compilers (e.g., Solaris f90) to look in the current 
# directory when the source file is not in the working directory (i.e.,
# in a VPATH build)

all-preamble: $(MPIMOD).$(MOD)

# Thes copy line in this step makes the F90 modules available to 
# the mpif90 script before an install takes place
# The if handles the Intel F90 compiler, which has an unusual interface
# (The mpimod.pcl file should contain only a local mpimod.pc name; if
# it contains a file name in another directory and that file does not 
# exist, the compiler may refuse to compile the file)
$(MPIMOD).$(MOD): $(srcdir)/mpi.f90 mpif.h
	@if [ -n "" ] ; then \
	    rm -f mpimod.pc mpimod.pcl ; \
	    echo "mpimod.pc" > mpimod.pcl ; \
	    echo $(F90_COMPILE_MODS)  -c $(srcdir)/mpi.f90 ; \
	    $(F90_COMPILE_MODS)  -c $(srcdir)/mpi.f90 ; \
	    cp mpimod.pc ../../../src/include/mpimod.pc ; \
	    cp mpimod.pcl ../../../src/include/mpimod.pcl ; \
	else \
	    if [ "$(F90EXT)" != "f90" ] ; then \
	        ln -sf mpi.f90 mpi.$(F90EXT) ; \
	    fi ; \
	    echo $(F90_COMPILE_MODS) -c $(srcdir)/mpi.$(F90EXT) ; \
	    $(F90_COMPILE_MODS) -c $(srcdir)/mpi.$(F90EXT) ; \
	    if [ "$(F90EXT)" != "f90" ] ; then \
	        rm -f mpi.$(F90EXT) ; \
	    fi ; \
	fi

# We need a free-format version of mpif.h
mpif.h: ../f77/mpif.h
	sed -e 's/^C/\!/g' ../f77/mpif.h > mpif.h
	
# To ensure that f90 can be used before a make-install step, we copy
# the library to the build directory (just like we do with the module files)
all-postamble:
	if [ -s lib${MPILIBNAME}f90.a ] ; then \
	   cp -p lib${MPILIBNAME}f90.a ../../../lib ; fi

clean-local:
	rm -f *.$(MOD)


# Documentation sources

distclean-local:
	rm -f ../../../bin/mpif90
	rm -f ../../../src/include/$(MPIMOD).$(MOD)
	rm -f ../../../lib/lib${MPILIBNAME}f90.a

FORCE_TARGET:

