kusano 2b45e8
#
kusano 2b45e8
# The Makefile compiles c wrappers and testers for CBLAS.  
kusano 2b45e8
#
kusano 2b45e8
kusano 2b45e8
TOPDIR = ..
kusano 2b45e8
include $(TOPDIR)/Makefile.system
kusano 2b45e8
kusano 2b45e8
CFLAGS += -DADD$(BU) -DCBLAS
kusano 2b45e8
kusano 2b45e8
LIB = $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
kusano 2b45e8
stestl1o = c_sblas1.o
kusano 2b45e8
kusano 2b45e8
stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
dtestl1o = c_dblas1.o
kusano 2b45e8
kusano 2b45e8
dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
ctestl1o = c_cblas1.o
kusano 2b45e8
kusano 2b45e8
ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
ztestl1o = c_zblas1.o 
kusano 2b45e8
kusano 2b45e8
ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o constant.o
kusano 2b45e8
kusano 2b45e8
all :: all1 all2 all3 
kusano 2b45e8
kusano 2b45e8
all1: xscblat1 xdcblat1 xccblat1 xzcblat1
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xscblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xdcblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xccblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xzcblat1
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xscblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xdcblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xccblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xzcblat1
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
all2: xscblat2 xdcblat2 xccblat2 xzcblat2
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xscblat2 < sin2
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xdcblat2 < din2
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xccblat2 < cin2
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xzcblat2 < zin2
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xscblat2 < sin2
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xdcblat2 < din2
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xccblat2 < cin2
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xzcblat2 < zin2
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
all3: xscblat3 xdcblat3 xccblat3 xzcblat3
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xscblat3 < sin3
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xdcblat3 < din3
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xccblat3 < cin3
kusano 2b45e8
	OMP_NUM_THREADS=2 ./xzcblat3 < zin3
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xscblat3 < sin3
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xdcblat3 < din3
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xccblat3 < cin3
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
clean ::
kusano 2b45e8
	rm -f x* 
kusano 2b45e8
kusano 2b45e8
FLDFLAGS = $(FFLAGS:-fPIC=)
kusano 2b45e8
CEXTRALIB = 
kusano 2b45e8
kusano 2b45e8
# Single real
kusano 2b45e8
xscblat1: $(stestl1o) c_sblat1.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xscblat2: $(stestl2o) c_sblat2.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xscblat3: $(stestl3o) c_sblat3.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
# Double real
kusano 2b45e8
xdcblat1: $(dtestl1o) c_dblat1.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xdcblat2: $(dtestl2o) c_dblat2.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xdcblat3: $(dtestl3o) c_dblat3.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
 
kusano 2b45e8
# Single complex
kusano 2b45e8
xccblat1: $(ctestl1o) c_cblat1.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xccblat2: $(ctestl2o) c_cblat2.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xccblat3: $(ctestl3o) c_cblat3.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
# Double complex 
kusano 2b45e8
xzcblat1: $(ztestl1o) c_zblat1.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xzcblat2: $(ztestl2o) c_zblat2.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
xzcblat3: $(ztestl3o) c_zblat3.o $(TOPDIR)/$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
   
kusano 2b45e8
include $(TOPDIR)/Makefile.tail