#######################################################################
# This makefile is part of the package for solving rank deficient
# least squares problems. 
# ==================================================================
#     L. Foster                   and   R. Kommu
#     Department of Mathematics         Department of Physics
#     San Jose State University         San Jose State University
#     San Jose, CA 95192                San Jose, CA 95192
#     foster@math.sjsu.edu              rkommu@email.sjsu.edu
# ==================================================================
# 03/05/2004
#
#  This makefile runs the test programs for the linear equation
#  routines from LAPACK and xGELSZ from this package. The test output
#  files are grouped as follows:
#
#       SLINTST -- Single precision real test routines
#       CLINTST -- Single precision complex test routines
#       DLINTST -- Double precision real test routines
#       ZLINTST -- Double precision complex test routines
#
#  Test programs can be executed for all or some of the four different
#  precisions.  Enter 'make -f makeunix' followed by one or more of the
#  data types desired.
#  Some examples:
#       make -f makeunix single
#       make -f makeunix single complex
#       make -f makeunix single double complex complex16
#  Alternatively, the command
#       make -f makeunix
#  without any arguments runs all eight test programs.
#  The executable files are called:
#       xlintsts, xlintstd, xlintstc, and xlintstz
#  and exist in the current directory level.
#
#  To remove the output files after the tests have been run, enter
#       make -f makeunix clean
#
#  To re-run specific tests after a make, enter (for example):
#       'rm stest.out; make -f makeunix'
#       (to re-run the single precision tests.)
#
# Please refer to the readme file in XGELSZ/INSTALL for 
# further documentation on the use of makefile in the package.
#######################################################################
include ../make.inc

all:     single complex double complex16

SLINTST= stest.out
CLINTST= ctest.out
DLINTST= dtest.out
ZLINTST= ztest.out

single:         $(SLINTST)
complex:        $(CLINTST)
double:         $(DLINTST)
complex16:      $(ZLINTST)

#
# ======== SINGLE LIN TESTS ===========================

stest.out: stest.in xlintsts
	@echo Testing REAL LAPACK linear equation routines
	./xlintsts < stest.in > $@ 2>&1
#
# ======== COMPLEX LIN TESTS ==========================

ctest.out: ctest.in xlintstc
	@echo Testing COMPLEX LAPACK linear equation routines
	./xlintstc < ctest.in > $@ 2>&1
#
# ======== DOUBLE LIN TESTS ===========================

dtest.out: dtest.in xlintstd
	@echo Testing DOUBLE PRECISION LAPACK linear equation routines
	./xlintstd < dtest.in > $@ 2>&1
#
# ======== COMPLEX16 LIN TESTS ========================

ztest.out: ztest.in xlintstz
	@echo Testing COMPLEX16 LAPACK linear equation routines
	./xlintstz < ztest.in > $@ 2>&1

xlintsts:
	( cd LIN ; $(MAKE) -f makeunix single )

xlintstc:
	( cd LIN ; $(MAKE) -f makeunix complex )

xlintstd:
	( cd LIN ; $(MAKE) -f makeunix double )

xlintstz:
	( cd LIN ; $(MAKE) -f makeunix complex16 )

clean:
	rm -f *.out core

cleanup:
	rm -f x* *.out core
