# 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 = overtake sendrecv isndrcv third fourth fifth sixth hvectest \
	hvectest2 hvec probe probe1 testtest1 ssendtest ssendtest2 typetest\
	dtypelife issendtest issend2 issendinit relrank nullproc trunc \
	truncmult typeub typeub2 typeub3 irecvtest htmsg \
	isendtest self sendrecv2 sendrecv3 sendrecv4 persistent waitany \
	pack bsendtest typebase irsend irsendinit longmsgs waitall \
	testsome getelm testall sndrcv nbtest nblock sendmany order hindexed \
	commit cancel persist typecreate reqcreate sndrcvrep flood flood2 \
	persist2 dataalign dtyperecv reqfree sndrcvrpl2 cancel2
OTHEREXECS = testtypes secondf allpair systest send1 \
		systest1 allpair2 bsendtest structf typebasef 
default: $(EXECS)

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

linktest: overtake secondf clean

all: testing

fortran_tests: secondf allpair allpair2 structf typebasef send1 pingpong

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

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

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

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

persistent: persistent.o
	$(CLINKER) $(OPTFLAGS) -o persistent persistent.o $(LIBS)

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

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

persist: persist.o
	$(CLINKER) $(OPTFLAGS) -o persist persist.o $(LIBS)

persist2: persist2.o
	$(CLINKER) $(OPTFLAGS) -o persist2 persist2.o $(LIBS)

sendrecv2: sendrecv2.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o sendrecv2 sendrecv2.o dtypes.o gcomm.o $(LIBS)

sendrecv3: sendrecv3.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o sendrecv3 sendrecv3.o dtypes.o gcomm.o $(LIBS)

sendrecv4: sendrecv4.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o sendrecv4 sendrecv4.o dtypes.o gcomm.o $(LIBS)

irsend: irsend.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o irsend irsend.o dtypes.o gcomm.o $(LIBS)

irsendinit: irsendinit.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o irsendinit irsendinit.o dtypes.o gcomm.o $(LIBS)

longmsgs: longmsgs.o
	$(CLINKER) $(OPTFLAGS) -o longmsgs longmsgs.o $(LIBS)

testsome: testsome.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o testsome testsome.o dtypes.o gcomm.o $(LIBS)

testall: testall.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o testall testall.o dtypes.o gcomm.o $(LIBS)

sndrcv: sndrcv.o dtypes.o gcomm.o
	$(CLINKER) $(OPTFLAGS) -o sndrcv sndrcv.o dtypes.o gcomm.o $(LIBS)

sndrcvrep: sndrcvrep.o
	$(CLINKER) $(OPTFLAGS) -o sndrcvrep sndrcvrep.o $(LIBS)

sndrcvrpl2: sndrcvrpl2.o
	$(CLINKER) $(OPTFLAGS) -o sndrcvrpl2 sndrcvrpl2.o $(LIBS)

getelm: getelm.o 
	$(CLINKER) $(OPTFLAGS) -o getelm getelm.o $(LIBS)

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

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

typeub2: typeub2.o
	$(CLINKER) $(OPTFLAGS) -o typeub2 typeub2.o $(LIBS)

typeub3: typeub3.o
	$(CLINKER) $(OPTFLAGS) -o typeub3 typeub3.o $(LIBS)

typecreate: typecreate.o
	$(CLINKER) $(OPTFLAGS) -o typecreate typecreate.o $(LIBS)

reqcreate: reqcreate.o
	$(CLINKER) $(OPTFLAGS) -o reqcreate reqcreate.o $(LIBS)

reqfree: reqfree.o
	$(CLINKER) $(OPTFLAGS) -o reqfree reqfree.o $(LIBS)

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

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

trunc: trunc.o
	$(CLINKER) $(OPTFLAGS) -o trunc trunc.o $(LIBS)

truncmult: truncmult.o
	$(CLINKER) $(OPTFLAGS) -o truncmult truncmult.o $(LIBS)

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

typebase: typebase.o
	$(CLINKER) $(OPTFLAGS) -o typebase typebase.o $(LIBS)

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

ssendtest2: ssendtest2.o
	$(CLINKER) $(OPTFLAGS) -o ssendtest2 ssendtest2.o $(LIBS)

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

issend2: issend2.o
	$(CLINKER) $(OPTFLAGS) -o issend2 issend2.o $(LIBS)

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

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

dataalign: dataalign.o
	$(CLINKER) $(OPTFLAGS) -o dataalign dataalign.o $(LIBS)

dtyperecv: dtyperecv.o
	$(CLINKER) $(OPTFLAGS) -o dtyperecv dtyperecv.o $(LIBS)

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

htmsg: htmsg.o
	$(CLINKER) $(OPTFLAGS) -o htmsg htmsg.o $(LIBS)

isendtest: isendtest.o
	$(CLINKER) $(OPTFLAGS) -o isendtest isendtest.o $(LIBS)

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

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

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

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

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

nblock: nblock.o 
	$(CLINKER) $(OPTFLAGS) -o nblock nblock.o $(LIBS)

sendmany: sendmany.o 
	$(CLINKER) $(OPTFLAGS) -o sendmany sendmany.o $(LIBS)

order: order.o
	$(CLINKER) $(OPTFLAGS) -o order order.o $(LIBS)

pack: pack.o
	$(CLINKER) $(OPTFLAGS) -o pack pack.o $(LIBS)

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

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

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

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

hvec: hvec.o
	$(CLINKER) $(OPTFLAGS) -o hvec hvec.o $(LIBS)

hindexed: hindexed.o 
	$(CLINKER) $(OPTFLAGS) -o hindexed hindexed.o $(LIBS)

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

nbtest: nbtest.o
	$(CLINKER) $(OPTFLAGS) -o nbtest nbtest.o $(LIBS)

waitany: waitany.o
	$(CLINKER) $(OPTFLAGS) -o waitany waitany.o $(LIBS)

waitall: waitall.o
	$(CLINKER) $(OPTFLAGS) -o waitall waitall.o $(LIBS)

commit: commit.o
	$(CLINKER) $(OPTFLAGS) -o commit commit.o $(LIBS)

cancel: cancel.o
	$(CLINKER) $(OPTFLAGS) -o cancel cancel.o $(LIBS)

cancel2: cancel2.o
	$(CLINKER) $(OPTFLAGS) -o cancel2 cancel2.o $(LIBS)

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

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

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

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

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

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

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

#
# Some systems have no test for a symbolic link and return false for
# a link that exists
#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

#
# Make sure that we remove executables for specific architectures
clean:
	@-/bin/rm -f *.o *~ PI* $(EXECS) *.out core pt2pt.diff $(OTHEREXECS) \
		*.trace rdb.* startup.* 
	@-for file in $(EXECS) Makefile ; do \
	   /bin/rm -f $$file.sun4 $$file.alpha $$file.IRIX $$file.freebsd ;\
	done

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