1# 2# The Makefile compiles c wrappers and testers for CBLAS. 3# 4 5dlvl = ../. 6include $(dlvl)/Makefile.in 7 8# Archive files necessary to compile 9LIB = $(CBLIB) $(BLLIB) 10 11# Object files for single real precision 12stestl1o = c_sblas1.o 13 14stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o 15 16stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o 17 18# Object files for double real precision 19dtestl1o = c_dblas1.o 20 21dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o 22 23dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o 24 25# Object files for single complex precision 26ctestl1o = c_cblas1.o 27 28ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o 29 30ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o 31 32# Object files for double complex precision 33ztestl1o = c_zblas1.o 34 35ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o 36 37ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o 38 39all: all1 all2 all3 40all1: stest1 dtest1 ctest1 ztest1 41all2: stest2 dtest2 ctest2 ztest2 42all3: stest3 dtest3 ctest3 ztest3 43 44clean: 45 rm -f core *.o a.out x* 46cleanobj: 47 rm -f core *.o a.out 48cleanexe: 49 rm -f x* 50 51stest1: xscblat1 52dtest1: xdcblat1 53ctest1: xccblat1 54ztest1: xzcblat1 55 56stest2: xscblat2 57dtest2: xdcblat2 58ctest2: xccblat2 59ztest2: xzcblat2 60 61stest3: xscblat3 62dtest3: xdcblat3 63ctest3: xccblat3 64ztest3: xzcblat3 65 66# 67# Compile each precision 68# 69 70# Single real 71xscblat1: $(stestl1o) c_sblat1.o 72 $(LOADER) $(LOADFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) 73xscblat2: $(stestl2o) c_sblat2.o 74 $(LOADER) $(LOADFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) 75xscblat3: $(stestl3o) c_sblat3.o 76 $(LOADER) $(LOADFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) 77# Double real 78xdcblat1: $(dtestl1o) c_dblat1.o 79 $(LOADER) $(LOADFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) 80xdcblat2: $(dtestl2o) c_dblat2.o 81 $(LOADER) $(LOADFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) 82xdcblat3: $(dtestl3o) c_dblat3.o 83 $(LOADER) $(LOADFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) 84 85# Single complex 86xccblat1: $(ctestl1o) c_cblat1.o 87 $(LOADER) $(LOADFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) 88xccblat2: $(ctestl2o) c_cblat2.o 89 $(LOADER) $(LOADFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) 90xccblat3: $(ctestl3o) c_cblat3.o 91 $(LOADER) $(LOADFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) 92 93# Double complex 94xzcblat1: $(ztestl1o) c_zblat1.o 95 $(LOADER) $(LOADFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) 96xzcblat2: $(ztestl2o) c_zblat2.o 97 $(LOADER) $(LOADFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) 98xzcblat3: $(ztestl3o) c_zblat3.o 99 $(LOADER) $(LOADFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) 100 101 102# RUN TESTS 103run: 104 @echo "--> TESTING BLAS 1 - SINGLE PRECISION <--" 105 @./xscblat1 > stest1.out 106 @echo "--> TESTING BLAS 1 - DOUBLE PRECISION <--" 107 @./xdcblat1 > dtest1.out 108 @echo "--> TESTING BLAS 1 - COMPLEX PRECISION <--" 109 @./xccblat1 > ctest1.out 110 @echo "--> TESTING BLAS 1 - DOUBLE COMPLEX PRECISION <--" 111 @./xzcblat1 > ztest1.out 112 @echo "--> TESTING BLAS 2 - SINGLE PRECISION <--" 113 @./xscblat2 < sin2 > stest2.out 114 @echo "--> TESTING BLAS 2 - DOUBLE PRECISION <--" 115 @./xdcblat2 < din2 > dtest2.out 116 @echo "--> TESTING BLAS 2 - COMPLEX PRECISION <--" 117 @./xccblat2 < cin2 > ctest2.out 118 @echo "--> TESTING BLAS 2 - DOUBLE COMPLEX PRECISION <--" 119 @./xzcblat2 < zin2 > ztest2.out 120 @echo "--> TESTING BLAS 3 - SINGLE PRECISION <--" 121 @./xscblat3 < sin3 > stest3.out 122 @echo "--> TESTING BLAS 3 - DOUBLE PRECISION <--" 123 @./xdcblat3 < din3 > dtest3.out 124 @echo "--> TESTING BLAS 3 - COMPLEX PRECISION <--" 125 @./xccblat3 < cin3 > ctest3.out 126 @echo "--> TESTING BLAS 3 - DOUBLE COMPLEX PRECISION <--" 127 @./xzcblat3 < zin3 > ztest3.out 128 129.SUFFIXES: .o .f .c 130 131.f.o: 132 $(FC) $(FFLAGS) -c $*.f 133.c.o: 134 $(CC) -I../include $(CFLAGS) -c $*.c 135