############################################################################
#
#  Program:         ScaLAPACK
#
#  Module:          Makefile
#
#  Purpose:         PBLAS Timing Makefile
#
#  Creation date:   March 20, 1995
#
#  Modified:
#
#  Send bug reports, comments or suggestions to scalapack@cs.utk.edu
#
############################################################################

include ../../SLmake.inc

sPBLAS1exe    = xspblas1tim
dPBLAS1exe    = xdpblas1tim
cPBLAS1exe    = xcpblas1tim
zPBLAS1exe    = xzpblas1tim

sPBLAS2exe    = xspblas2tim
dPBLAS2exe    = xdpblas2tim
cPBLAS2exe    = xcpblas2tim
zPBLAS2exe    = xzpblas2tim

sPBLAS3exe    = xspblas3tim
dPBLAS3exe    = xdpblas3tim
cPBLAS3exe    = xcpblas3tim
zPBLAS3exe    = xzpblas3tim

spb1tim = $(PBLASTSTdir)/$(sPBLAS1exe)
dpb1tim = $(PBLASTSTdir)/$(dPBLAS1exe)
cpb1tim = $(PBLASTSTdir)/$(cPBLAS1exe)
zpb1tim = $(PBLASTSTdir)/$(zPBLAS1exe)

spb2tim = $(PBLASTSTdir)/$(sPBLAS2exe)
dpb2tim = $(PBLASTSTdir)/$(dPBLAS2exe)
cpb2tim = $(PBLASTSTdir)/$(cPBLAS2exe)
zpb2tim = $(PBLASTSTdir)/$(zPBLAS2exe)

spb3tim = $(PBLASTSTdir)/$(sPBLAS3exe)
dpb3tim = $(PBLASTSTdir)/$(dPBLAS3exe)
cpb3tim = $(PBLASTSTdir)/$(cPBLAS3exe)
zpb3tim = $(PBLASTSTdir)/$(zPBLAS3exe)

spb1t   = psbla1tim.o psblatim.o pblatim.o pberror_.o
dpb1t   = pdbla1tim.o pdblatim.o pblatim.o pberror_.o
cpb1t   = pcbla1tim.o pcblatim.o pblatim.o pberror_.o
zpb1t   = pzbla1tim.o pzblatim.o pblatim.o pberror_.o

spb2t   = psbla2tim.o psblatim.o pblatim.o pberror_.o
dpb2t   = pdbla2tim.o pdblatim.o pblatim.o pberror_.o
cpb2t   = pcbla2tim.o pcblatim.o pblatim.o pberror_.o
zpb2t   = pzbla2tim.o pzblatim.o pblatim.o pberror_.o

spb3t   = psbla3tim.o psblatim.o pblatim.o pberror_.o
dpb3t   = pdbla3tim.o pdblatim.o pblatim.o pberror_.o
cpb3t   = pcbla3tim.o pcblatim.o pblatim.o pberror_.o
zpb3t   = pzbla3tim.o pzblatim.o pblatim.o pberror_.o

all : single double complex complex16

single:    $(spb1tim) $(spb2tim) $(spb3tim)

double:    $(dpb1tim) $(dpb2tim) $(dpb3tim)

complex:   $(cpb1tim) $(cpb2tim) $(cpb3tim)

complex16: $(zpb1tim) $(zpb2tim) $(zpb3tim)

$(PBLASTSTdir)/PSBLA1TIM.dat: PSBLA1TIM.dat
	cp PSBLA1TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PDBLA1TIM.dat: PDBLA1TIM.dat
	cp PDBLA1TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PCBLA1TIM.dat: PCBLA1TIM.dat
	cp PCBLA1TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PZBLA1TIM.dat: PZBLA1TIM.dat
	cp PZBLA1TIM.dat $(PBLASTSTdir)

$(spb1tim) : $(PBLASLIB) $(TOOLSLIB) $(spb1t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(spb1tim) $(spb1t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PSBLA1TIM.dat
$(dpb1tim) : $(PBLASLIB) $(TOOLSLIB) $(dpb1t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(dpb1tim) $(dpb1t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PDBLA1TIM.dat
$(cpb1tim) : $(PBLASLIB) $(TOOLSLIB) $(cpb1t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(cpb1tim) $(cpb1t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PCBLA1TIM.dat
$(zpb1tim) : $(PBLASLIB) $(TOOLSLIB) $(zpb1t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(zpb1tim) $(zpb1t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PZBLA1TIM.dat

$(PBLASTSTdir)/PSBLA2TIM.dat: PSBLA2TIM.dat
	cp PSBLA2TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PDBLA2TIM.dat: PDBLA2TIM.dat
	cp PDBLA2TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PCBLA2TIM.dat: PCBLA2TIM.dat
	cp PCBLA2TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PZBLA2TIM.dat: PZBLA2TIM.dat
	cp PZBLA2TIM.dat $(PBLASTSTdir)

$(spb2tim) : $(PBLASLIB) $(TOOLSLIB) $(spb2t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(spb2tim) $(spb2t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PSBLA2TIM.dat
$(dpb2tim) : $(PBLASLIB) $(TOOLSLIB) $(dpb2t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(dpb2tim) $(dpb2t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PDBLA2TIM.dat
$(cpb2tim) : $(PBLASLIB) $(TOOLSLIB) $(cpb2t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(cpb2tim) $(cpb2t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PCBLA2TIM.dat
$(zpb2tim) : $(PBLASLIB) $(TOOLSLIB) $(zpb2t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(zpb2tim) $(zpb2t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PZBLA2TIM.dat

$(PBLASTSTdir)/PSBLA3TIM.dat: PSBLA3TIM.dat
	cp PSBLA3TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PDBLA3TIM.dat: PDBLA3TIM.dat
	cp PDBLA3TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PCBLA3TIM.dat: PCBLA3TIM.dat
	cp PCBLA3TIM.dat $(PBLASTSTdir)
$(PBLASTSTdir)/PZBLA3TIM.dat: PZBLA3TIM.dat
	cp PZBLA3TIM.dat $(PBLASTSTdir)

$(spb3tim) : $(PBLASLIB) $(TOOLSLIB) $(spb3t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(spb3tim) $(spb3t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PSBLA3TIM.dat
$(dpb3tim) : $(PBLASLIB) $(TOOLSLIB) $(dpb3t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(dpb3tim) $(dpb3t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PDBLA3TIM.dat
$(cpb3tim) : $(PBLASLIB) $(TOOLSLIB) $(cpb3t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(cpb3tim) $(cpb3t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PCBLA3TIM.dat
$(zpb3tim) : $(PBLASLIB) $(TOOLSLIB) $(zpb3t)
	$(F77LOADER) $(F77LOADFLAGS) -o $(zpb3tim) $(zpb3t) $(LIBS)
	$(MAKE) $(PBLASTSTdir)/PZBLA3TIM.dat

$(spb1t): $(FRC)
$(dpb1t): $(FRC)
$(cpb1t): $(FRC)
$(zpb1t): $(FRC)

$(spb2t): $(FRC)
$(dpb2t): $(FRC)
$(cpb2t): $(FRC)
$(zpb2t): $(FRC)

$(spb3t): $(FRC)
$(dpb3t): $(FRC)
$(cpb3t): $(FRC)
$(zpb3t): $(FRC)

FRC:
	@FRC=$(FRC)

clean :
	rm -f *.o

.f.o : ; $(F77) -c $(F77FLAGS) $*.f

.c.o : ; $(CC) -c $(CCFLAGS) $(CDEFS) $*.c
