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