1 # 2 # The Makefile compiles c wrappers and testers for CBLAS. 3 # 4 5 dlvl = ../. 6 include $(dlvl)/Makefile.in 7 8 # Archive files necessary to compile 9 LIB = $(CBLIB) $(BLLIB) 10 11 # Object files for single real precision 12 stestl1o = c_sblas1.o 13 14 stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o 15 16 stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o 17 18 # Object files for double real precision 19 dtestl1o = c_dblas1.o 20 21 dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o 22 23 dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o 24 25 # Object files for single complex precision 26 ctestl1o = c_cblas1.o 27 28 ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o 29 30 ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o 31 32 # Object files for double complex precision 33 ztestl1o = c_zblas1.o 34 35 ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o 36 37 ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o 38 39 all: all1 all2 all3 40 all1: stest1 dtest1 ctest1 ztest1 41 all2: stest2 dtest2 ctest2 ztest2 42 all3: stest3 dtest3 ctest3 ztest3 43 44 clean: 45 rm -f core *.o a.out x* 46 cleanobj: 47 rm -f core *.o a.out 48 cleanexe: 49 rm -f x* 50 51 stest1: xscblat1 52 dtest1: xdcblat1 53 ctest1: xccblat1 54 ztest1: xzcblat1 55 56 stest2: xscblat2 57 dtest2: xdcblat2 58 ctest2: xccblat2 59 ztest2: xzcblat2 60 61 stest3: xscblat3 62 dtest3: xdcblat3 63 ctest3: xccblat3 64 ztest3: xzcblat3 65 66 # 67 # Compile each precision 68 # 69 70 # Single real 71 xscblat1: $(stestl1o) c_sblat1.o 72 $(LOADER) $(LOADFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) 73 xscblat2: $(stestl2o) c_sblat2.o 74 $(LOADER) $(LOADFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) 75 xscblat3: $(stestl3o) c_sblat3.o 76 $(LOADER) $(LOADFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) 77 # Double real 78 xdcblat1: $(dtestl1o) c_dblat1.o 79 $(LOADER) $(LOADFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) 80 xdcblat2: $(dtestl2o) c_dblat2.o 81 $(LOADER) $(LOADFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) 82 xdcblat3: $(dtestl3o) c_dblat3.o 83 $(LOADER) $(LOADFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) 84 85 # Single complex 86 xccblat1: $(ctestl1o) c_cblat1.o 87 $(LOADER) $(LOADFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) 88 xccblat2: $(ctestl2o) c_cblat2.o 89 $(LOADER) $(LOADFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) 90 xccblat3: $(ctestl3o) c_cblat3.o 91 $(LOADER) $(LOADFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) 92 93 # Double complex 94 xzcblat1: $(ztestl1o) c_zblat1.o 95 $(LOADER) $(LOADFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) 96 xzcblat2: $(ztestl2o) c_zblat2.o 97 $(LOADER) $(LOADFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) 98 xzcblat3: $(ztestl3o) c_zblat3.o 99 $(LOADER) $(LOADFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) 100 101 102 # RUN TESTS 103 run: 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