HOME	   = /home/drmac/NUMLAB/xGESVDQ/ACM_TOMS/SIGMA
# Home directory of the part of SIGMA which is submitted to ACM TOMS 
# User of this test program should define his/her HOME.
# ---------------------------------------------------------------------------------
#  Compiler, options and link to MKL (need BLAS and LAPACK)
#  User of this test program should define his/her compiler, optiona and link
#  to BLAS and LAPACK
FORTRAN	      = ifort
OPTSCOMPILE    = -O4 
OPTSLINK_THR   = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
OPTSLINK_SEQ   = -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
#----------------------------------------------------------------------------------
# Directories for source files of xGESVDQ, test matrix generators, auxiliaries and
# test programs 
S = $(HOME)/xGESVDQ
M = $(HOME)/MATGEN
A = $(HOME)/AUXSBR
T = $(HOME)/TESTING
R = $(HOME)/REFVAL
#-----------------------------------------------------------------------------------
#
OBJECTSC = $(S)/CGESVDQ.o $(S)/ZGESVDQ.o $(R)/zgesvjx.o\
	$(A)/zchkun.o $(A)/zcmpsv.o $(A)/zresvd.o $(A)/xgec2z.o $(A)/xgez2c.o $(M)/zmgen.o $(T)/TestZGESVDQ.o
OBJECTSR = $(S)/SGESVDQ.o $(S)/DGESVDQ.o\
	$(A)/dchkor.o $(A)/dcmpsv.o $(A)/dresvd.o $(A)/xges2d.o $(A)/xged2s.o $(M)/dmgen.o\
	$(T)/TestDGESVDQ.o

rtestt:  $(OBJECTSR)
	clear
	$(FORTRAN) -o $@ $(OBJECTSR) $(OPTSLINK_THR)
rtests: $(OBJECTSR)
	clear
	$(FORTRAN) -o $@ $(OBJECTSR) $(OPTSLINK_SEQ)
ctestt:  $(OBJECTSC)
	clear
	$(FORTRAN) -o $@ $(OBJECTSC) $(OPTSLINK_THR)
ctests:  $(OBJECTSC)
	clear
	$(FORTRAN) -o $@ $(OBJECTSC) $(OPTSLINK_SEQ)

.f.o:
	$(FORTRAN) -c $(OPTSCOMPILE) $< -o $@
#-----------------------------------------------------------------------------------
#
.f90.o:
	$(FORTRAN) -c $(OPTSCOMPILE) $< -o $@
	
.F.o:
	$(FORTRAN) -c $(OPTSCOMPILE) $< -o $@ -openmp

