# Generated automatically from Makefile.in by configure.
ALL: default
##### User configurable options #####

MPIR_HOME   = /usr
CC          = /usr/lib/LINUX/ch_p4/mpicc
CLINKER     = /usr/lib/LINUX/ch_p4/mpicc
CCC         = /usr/lib/LINUX/ch_p4/mpiCC
CCLINKER    = $(CCC)
F77         = /usr/lib/LINUX/ch_p4/mpif77
FLINKER     = /usr/lib/LINUX/ch_p4/mpif77
OPTFLAGS    = -O
MPIFDEP     = 

### End User configurable options ###

SHELL = /bin/sh

PROFLIB =
CFLAGS  =  -DHAVE_PROTOTYPES  -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG $(OPTFLAGS) 
CCFLAGS = $(CFLAGS)
FFLAGS = $(OPTFLAGS)
# Use LIBS to add any special libraries for C programs
LIBS = 
# Use FLIBS to add any special libraries for Fortran programs
FLIBS = 
EXECS = attrtest attrt ictest ictest2 ictest3 grouptest groupcreate \
	attrerr
OTHEREXECS = attrtest
MPI2EXECS = commnames commnamesf
default: $(EXECS)

fortran_tests: attrtest commnamesf

#
# Note that runtests builds the executables as required
testing: 
	-./runtests $(TESTARGS)

linktest: default clean

all: testing

attrtest: $(MPIFDEP) attrtest.o
	$(FLINKER) $(OPTFLAGS) -o attrtest attrtest.o $(FLIBS)

commnamesf: $(MPIFDEP) commnamesf.o
	$(FLINKER) $(OPTFLAGS) -o commnamesf commnamesf.o $(FLIBS)

attrt: attrt.o test.o
	$(CLINKER) $(OPTFLAGS) -o attrt attrt.o test.o $(LIBS)

attrerr: attrerr.o test.o
	$(CLINKER) $(OPTFLAGS) -o attrerr attrerr.o test.o $(LIBS)

commnames: commnames.o
	$(CLINKER) $(OPTFLAGS) -o commnames commnames.o $(LIBS)
ictest: ictest.o
	$(CLINKER) $(OPTFLAGS) -o ictest ictest.o $(LIBS)
ictest2: ictest2.o
	$(CLINKER) $(OPTFLAGS) -o ictest2 ictest2.o $(LIBS)
ictest3: ictest3.o
	$(CLINKER) $(OPTFLAGS) -o ictest3 ictest3.o $(LIBS)
grouptest: grouptest.o
	$(CLINKER) $(OPTFLAGS) -o grouptest grouptest.o $(LIBS)
groupcreate: groupcreate.o
	$(CLINKER) $(OPTFLAGS) -o groupcreate groupcreate.o $(LIBS)

mpif.h: $(MPIR_HOME)/include/mpif.h
	if test \! -f mpif.h ; then \
	    /bin/rm -f mpif.h ; \
	    ln -s $(MPIR_HOME)/include/mpif.h . ; \
	fi

clean:
	@-/bin/rm -f *.o *~ PI* $(EXECS) $(OTHEREXECS) $(MPI2EXECS) \
		core *.out *.diff *.trace

.c.o:
	$(CC) $(CFLAGS) -c $*.c
.f.o:
	$(F77) $(FFLAGS) -c $*.f
