#######################################################################
# 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 timing programs for the xGELSZ routines
#  and the least squares routines from LAPACK.
#  The timing output files are grouped as follows:
#
#       SLINTIM  -- Single precision real time routines
#       CLINTIM  -- Single precision complex time routines
#       DLINTIM  -- Double precision real time routines
#       ZLINTIM  -- Double precision complex time routines
#
#  Timing programs can be executed for all or some of the four 
#  different precisions.  Enter 'nmake -f makewin32' to time all
#  the precisions or '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 four test programs.
#
#  The executable files are called:
#       xlintims, xlintimd, xlintimc, and xlintimz
#  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 stime.out; nmake -f makewin32' 
#
#       'rm *time.out; nmake -f makewin32'  (to re-run all the timings)
#
# Please refer to the readme file in XGELSZ/INSTALL for further
# documentation on the use of makefiles in this package.
#######################################################################

!include <..\make.inc>

all:     single complex double complex16

SLINTIM= stime.out
CLINTIM= ctime.out
DLINTIM= dtime.out
ZLINTIM= ztime.out

single:         $(SLINTIM)
complex:        $(CLINTIM)
double:         $(DLINTIM)
complex16:      $(ZLINTIM)

#
# ======== SINGLE LIN TIMINGS ===========================

stime.out: stime.in xlintims.exe
	@echo Timing square REAL LAPACK linear equation routines
	cd $(HOME)\TIMING
	xlintims.exe < stime.in > $@ 2>&1

#
# ======== COMPLEX LIN TIMINGS ==========================

ctime.out: ctime.in xlintimc.exe
	@echo Timing square COMPLEX LAPACK linear equation routines
	cd $(HOME)\TIMING
	xlintimc.exe < ctime.in > $@ 2>&1

#
# ======== DOUBLE LIN TIMINGS ===========================

dtime.out: dtime.in xlintimd.exe
	@echo Timing square DOUBLE LAPACK linear equation routines
	cd $(HOME)\TIMING
	xlintimd.exe < dtime.in > $@ 2>&1

#
# ======== COMPLEX16 LIN TIMINGS ========================

ztime.out: ztime.in xlintimz.exe
	@echo Timing square COMPLEX16 LAPACK linear equation routines
	cd $(HOME)\TIMING
	xlintimz.exe < ztime.in > $@ 2>&1

xlintims.exe:
	cd $(HOME)\TIMING\LIN\LINSRC
	$(MAKE) -f makewin32 single
	cd $(HOME)\TIMING\LIN
	$(MAKE) -f makewin32 single

xlintimc.exe:
	cd $(HOME)\TIMING\LIN\LINSRC
	$(MAKE) -f makewin32 complex
	cd $(HOME)\TIMING\LIN
	$(MAKE) -f makewin32 complex

xlintimd.exe:
	cd $(HOME)\TIMING\LIN\LINSRC
	$(MAKE) -f makewin32 double
	cd $(HOME)\TIMING\LIN
	$(MAKE) -f makewin32 double

xlintimz.exe:
	cd $(HOME)\TIMING\LIN\LINSRC
	$(MAKE) -f makewin32 complex16
	cd $(HOME)\TIMING\LIN
	$(MAKE) -f makewin32 complex16

clean:
	del *.out core

cleanup:
	del x* *.out core
