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.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 precision real
  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 precision real
  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 precision complex
  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 precision complex
  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: xscblat1 xdcblat1 xccblat1 xzcblat1
  25. all2: xscblat2 xdcblat2 xccblat2 xzcblat2
  26. all3: xscblat3 xdcblat3 xccblat3 xzcblat3
  27. #
  28. # Compile each precision
  29. #
  30. # Single real
  31. xscblat1: c_sblat1.o $(stestl1o) $(LIB)
  32. $(LOADER) $(LOADOPTS) -o $@ $^
  33. xscblat2: c_sblat2.o $(stestl2o) $(LIB)
  34. $(LOADER) $(LOADOPTS) -o $@ $^
  35. xscblat3: c_sblat3.o $(stestl3o) $(LIB)
  36. $(LOADER) $(LOADOPTS) -o $@ $^
  37. # Double real
  38. xdcblat1: c_dblat1.o $(dtestl1o) $(LIB)
  39. $(LOADER) $(LOADOPTS) -o $@ $^
  40. xdcblat2: c_dblat2.o $(dtestl2o) $(LIB)
  41. $(LOADER) $(LOADOPTS) -o $@ $^
  42. xdcblat3: c_dblat3.o $(dtestl3o) $(LIB)
  43. $(LOADER) $(LOADOPTS) -o $@ $^
  44. # Single complex
  45. xccblat1: c_cblat1.o $(ctestl1o) $(LIB)
  46. $(LOADER) $(LOADOPTS) -o $@ $^
  47. xccblat2: c_cblat2.o $(ctestl2o) $(LIB)
  48. $(LOADER) $(LOADOPTS) -o $@ $^
  49. xccblat3: c_cblat3.o $(ctestl3o) $(LIB)
  50. $(LOADER) $(LOADOPTS) -o $@ $^
  51. # Double complex
  52. xzcblat1: c_zblat1.o $(ztestl1o) $(LIB)
  53. $(LOADER) $(LOADOPTS) -o $@ $^
  54. xzcblat2: c_zblat2.o $(ztestl2o) $(LIB)
  55. $(LOADER) $(LOADOPTS) -o $@ $^
  56. xzcblat3: c_zblat3.o $(ztestl3o) $(LIB)
  57. $(LOADER) $(LOADOPTS) -o $@ $^
  58. # RUN TESTS
  59. run: all
  60. @echo "--> TESTING CBLAS 1 - SINGLE PRECISION REAL <--"
  61. @./xscblat1 > stest1.out
  62. @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION REAL <--"
  63. @./xdcblat1 > dtest1.out
  64. @echo "--> TESTING CBLAS 1 - SINGLE PRECISION COMPLEX <--"
  65. @./xccblat1 > ctest1.out
  66. @echo "--> TESTING CBLAS 1 - DOUBLE PRECISION COMPLEX <--"
  67. @./xzcblat1 > ztest1.out
  68. @echo "--> TESTING CBLAS 2 - SINGLE PRECISION REAL <--"
  69. @./xscblat2 < sin2 > stest2.out
  70. @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION REAL <--"
  71. @./xdcblat2 < din2 > dtest2.out
  72. @echo "--> TESTING CBLAS 2 - SINGLE PRECISION COMPLEX <--"
  73. @./xccblat2 < cin2 > ctest2.out
  74. @echo "--> TESTING CBLAS 2 - DOUBLE PRECISION COMPLEX <--"
  75. @./xzcblat2 < zin2 > ztest2.out
  76. @echo "--> TESTING CBLAS 3 - SINGLE PRECISION REAL <--"
  77. @./xscblat3 < sin3 > stest3.out
  78. @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION REAL <--"
  79. @./xdcblat3 < din3 > dtest3.out
  80. @echo "--> TESTING CBLAS 3 - SINGLE PRECISION COMPLEX <--"
  81. @./xccblat3 < cin3 > ctest3.out
  82. @echo "--> TESTING CBLAS 3 - DOUBLE PRECISION COMPLEX <--"
  83. @./xzcblat3 < zin3 > ztest3.out
  84. clean: cleanobj cleanexe cleantest
  85. cleanobj:
  86. rm -f *.o
  87. cleanexe:
  88. rm -f x*
  89. cleantest:
  90. rm -f *.out core
  91. .SUFFIXES: .o .f .c
  92. .c.o:
  93. $(CC) $(CFLAGS) -I../include -c -o $@ $<
  94. .f.o:
  95. $(FORTRAN) $(OPTS) -c -o $@ $<