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 4.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #
  2. # The Makefile compiles c wrappers and testers for CBLAS.
  3. #
  4. TOPDIR = ..
  5. include $(TOPDIR)/Makefile.system
  6. override CFLAGS += -DADD$(BU) -DCBLAS
  7. override TARGET_ARCH=
  8. override TARGET_MACH=
  9. LIB = $(TOPDIR)/$(LIBNAME)
  10. stestl1o = c_sblas1.o
  11. stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o constant.o
  12. stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o constant.o
  13. dtestl1o = c_dblas1.o
  14. dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o constant.o
  15. dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o constant.o
  16. ctestl1o = c_cblas1.o
  17. ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o constant.o
  18. ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o constant.o
  19. ctestl3o_3m = c_cblas3_3m.o c_c3chke_3m.o auxiliary.o c_xerbla.o constant.o
  20. ztestl1o = c_zblas1.o
  21. ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o constant.o
  22. ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o constant.o
  23. ztestl3o_3m = c_zblas3_3m.o c_z3chke_3m.o auxiliary.o c_xerbla.o constant.o
  24. ifeq ($(NOFORTRAN),1)
  25. all ::
  26. else
  27. all :: all1 all2 all3
  28. endif
  29. all1: xscblat1 xdcblat1 xccblat1 xzcblat1
  30. ifndef CROSS
  31. ifeq ($(USE_OPENMP), 1)
  32. OMP_NUM_THREADS=2 ./xscblat1
  33. OMP_NUM_THREADS=2 ./xdcblat1
  34. OMP_NUM_THREADS=2 ./xccblat1
  35. OMP_NUM_THREADS=2 ./xzcblat1
  36. else
  37. OPENBLAS_NUM_THREADS=2 ./xscblat1
  38. OPENBLAS_NUM_THREADS=2 ./xdcblat1
  39. OPENBLAS_NUM_THREADS=2 ./xccblat1
  40. OPENBLAS_NUM_THREADS=2 ./xzcblat1
  41. endif
  42. endif
  43. all2: xscblat2 xdcblat2 xccblat2 xzcblat2
  44. ifndef CROSS
  45. ifeq ($(USE_OPENMP), 1)
  46. OMP_NUM_THREADS=2 ./xscblat2 < sin2
  47. OMP_NUM_THREADS=2 ./xdcblat2 < din2
  48. OMP_NUM_THREADS=2 ./xccblat2 < cin2
  49. OMP_NUM_THREADS=2 ./xzcblat2 < zin2
  50. else
  51. OPENBLAS_NUM_THREADS=2 ./xscblat2 < sin2
  52. OPENBLAS_NUM_THREADS=2 ./xdcblat2 < din2
  53. OPENBLAS_NUM_THREADS=2 ./xccblat2 < cin2
  54. OPENBLAS_NUM_THREADS=2 ./xzcblat2 < zin2
  55. endif
  56. endif
  57. all3: xscblat3 xdcblat3 xccblat3 xzcblat3
  58. ifndef CROSS
  59. ifeq ($(USE_OPENMP), 1)
  60. OMP_NUM_THREADS=2 ./xscblat3 < sin3
  61. OMP_NUM_THREADS=2 ./xdcblat3 < din3
  62. OMP_NUM_THREADS=2 ./xccblat3 < cin3
  63. OMP_NUM_THREADS=2 ./xzcblat3 < zin3
  64. else
  65. OPENBLAS_NUM_THREADS=2 ./xscblat3 < sin3
  66. OPENBLAS_NUM_THREADS=2 ./xdcblat3 < din3
  67. OPENBLAS_NUM_THREADS=2 ./xccblat3 < cin3
  68. OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3
  69. endif
  70. all3_3m: xzcblat3_3m xccblat3_3m
  71. ifeq ($(USE_OPENMP), 1)
  72. OMP_NUM_THREADS=2 ./xccblat3_3m < cin3_3m
  73. OMP_NUM_THREADS=2 ./xzcblat3_3m < zin3_3m
  74. else
  75. OPENBLAS_NUM_THREADS=2 ./xccblat3_3m < cin3_3m
  76. OPENBLAS_NUM_THREADS=2 ./xzcblat3_3m < zin3_3m
  77. endif
  78. endif
  79. clean ::
  80. rm -f x*
  81. FLDFLAGS = $(FFLAGS:-fPIC=) $(LDFLAGS)
  82. ifeq ($(USE_OPENMP), 1)
  83. ifeq ($(F_COMPILER), GFORTRAN)
  84. ifeq ($(C_COMPILER), CLANG)
  85. CEXTRALIB = -lomp
  86. endif
  87. endif
  88. endif
  89. # Single real
  90. xscblat1: $(stestl1o) c_sblat1.o $(TOPDIR)/$(LIBNAME)
  91. $(FC) $(FLDFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  92. xscblat2: $(stestl2o) c_sblat2.o $(TOPDIR)/$(LIBNAME)
  93. $(FC) $(FLDFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  94. xscblat3: $(stestl3o) c_sblat3.o $(TOPDIR)/$(LIBNAME)
  95. $(FC) $(FLDFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  96. # Double real
  97. xdcblat1: $(dtestl1o) c_dblat1.o $(TOPDIR)/$(LIBNAME)
  98. $(FC) $(FLDFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  99. xdcblat2: $(dtestl2o) c_dblat2.o $(TOPDIR)/$(LIBNAME)
  100. $(FC) $(FLDFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  101. xdcblat3: $(dtestl3o) c_dblat3.o $(TOPDIR)/$(LIBNAME)
  102. $(FC) $(FLDFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  103. # Single complex
  104. xccblat1: $(ctestl1o) c_cblat1.o $(TOPDIR)/$(LIBNAME)
  105. $(FC) $(FLDFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  106. xccblat2: $(ctestl2o) c_cblat2.o $(TOPDIR)/$(LIBNAME)
  107. $(FC) $(FLDFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  108. xccblat3: $(ctestl3o) c_cblat3.o $(TOPDIR)/$(LIBNAME)
  109. $(FC) $(FLDFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  110. xccblat3_3m: $(ctestl3o_3m) c_cblat3_3m.o $(TOPDIR)/$(LIBNAME)
  111. $(FC) $(FLDFLAGS) -o xccblat3_3m c_cblat3_3m.o $(ctestl3o_3m) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  112. # Double complex
  113. xzcblat1: $(ztestl1o) c_zblat1.o $(TOPDIR)/$(LIBNAME)
  114. $(FC) $(FLDFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  115. xzcblat2: $(ztestl2o) c_zblat2.o $(TOPDIR)/$(LIBNAME)
  116. $(FC) $(FLDFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  117. xzcblat3: $(ztestl3o) c_zblat3.o $(TOPDIR)/$(LIBNAME)
  118. $(FC) $(FLDFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  119. xzcblat3_3m: $(ztestl3o_3m) c_zblat3_3m.o $(TOPDIR)/$(LIBNAME)
  120. $(FC) $(FLDFLAGS) -o xzcblat3_3m c_zblat3_3m.o $(ztestl3o_3m) $(LIB) $(EXTRALIB) $(CEXTRALIB)
  121. include $(TOPDIR)/Makefile.tail