You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 3.7 kB

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