#######################################################################
# 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 'nmake -f makewin32' followed by one or more of
#  the data types desired.
#  Some examples:
#       nmake -f makewin32 single
#       nmake -f makewin32 single complex
#       nmake -f makewin32 single double complex complex16
#  Alternatively, the command
#       nmake -f makewin32
#  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
#       nmake -f makewin32 clean
#
#  To re-run specific tests after a make, enter (for example):
#       'rm stest.out; nmake -f makewin32'
#       (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.exe
	@echo Data file for testing REAL LAPACK linear equation routines
	cd $(HOME)\TESTING
	xlintsts.exe < stest.in > $@ 2>&1
#
# ======== COMPLEX LIN TESTS ==========================

ctest.out: ctest.in xlintstc.exe
	@echo Data file for testing COMPLEX LAPACK linear equation routines
	cd $(HOME)\TESTING
	xlintstc.exe < ctest.in > $@ 2>&1
#
# ======== DOUBLE LIN TESTS ===========================

dtest.out: dtest.in xlintstd.exe
	@echo Data file for testing DOUBLE PRECISION LAPACK linear equation routines
	cd $(HOME)\TESTING
	xlintstd.exe < dtest.in > $@ 2>&1
#
# ======== COMPLEX16 LIN TESTS ========================

ztest.out: ztest.in xlintstz.exe
	@echo Data file for testing COMPLEX16 LAPACK linear equation routines
	cd $(HOME)\TESTING
	xlintstz.exe < ztest.in > $@ 2>&1

xlintsts.exe:
	cd $(HOME)\TESTING\LIN
	$(MAKE) -f makewin32 single

xlintstc.exe:
	cd $(HOME)\TESTING\LIN
	$(MAKE) -f makewin32 complex

xlintstd.exe:
	cd $(HOME)\TESTING\LIN
	$(MAKE) -f makewin32 double

xlintstz.exe:
	cd $(HOME)\TESTING\LIN
	$(MAKE) -f makewin32 complex16

clean:
	del *.out core

cleanup:
	del x* *.out core
