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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #######################################################################
  2. # This is the makefile to create a library for the BLAS.
  3. # The files are grouped as follows:
  4. #
  5. # SBLAS1 -- Single precision real BLAS routines
  6. # CBLAS1 -- Single precision complex BLAS routines
  7. # DBLAS1 -- Double precision real BLAS routines
  8. # ZBLAS1 -- Double precision complex BLAS routines
  9. #
  10. # CB1AUX -- Real BLAS routines called by complex routines
  11. # ZB1AUX -- D.P. real BLAS routines called by d.p. complex
  12. # routines
  13. #
  14. # ALLBLAS -- Auxiliary routines for Level 2 and 3 BLAS
  15. #
  16. # SBLAS2 -- Single precision real BLAS2 routines
  17. # CBLAS2 -- Single precision complex BLAS2 routines
  18. # DBLAS2 -- Double precision real BLAS2 routines
  19. # ZBLAS2 -- Double precision complex BLAS2 routines
  20. #
  21. # SBLAS3 -- Single precision real BLAS3 routines
  22. # CBLAS3 -- Single precision complex BLAS3 routines
  23. # DBLAS3 -- Double precision real BLAS3 routines
  24. # ZBLAS3 -- Double precision complex BLAS3 routines
  25. #
  26. # The library can be set up to include routines for any combination
  27. # of the four precisions. To create or add to the library, enter make
  28. # followed by one or more of the precisions desired. Some examples:
  29. # make single
  30. # make single complex
  31. # make single double complex complex16
  32. # Note that these commands are not safe for parallel builds.
  33. #
  34. # Alternatively, the commands
  35. # make all
  36. # or
  37. # make
  38. # without any arguments creates a library of all four precisions.
  39. # The name of the library is held in BLASLIB, which is set in the
  40. # top-level make.inc
  41. #
  42. # To remove the object files after the library is created, enter
  43. # make cleanobj
  44. # To force the source files to be recompiled, enter, for example,
  45. # make single FRC=FRC
  46. #
  47. #---------------------------------------------------------------------
  48. #
  49. # Edward Anderson, University of Tennessee
  50. # March 26, 1990
  51. # Susan Ostrouchov, Last updated September 30, 1994
  52. # ejr, May 2006.
  53. #
  54. #######################################################################
  55. TOPSRCDIR = ../..
  56. include $(TOPSRCDIR)/make.inc
  57. .PHONY: all
  58. all: $(BLASLIB)
  59. #---------------------------------------------------------
  60. # Comment out the next 6 definitions if you already have
  61. # the Level 1 BLAS.
  62. #---------------------------------------------------------
  63. SBLAS1 = isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o \
  64. srot.o srotg.o sscal.o sswap.o sdsdot.o srotmg.o srotm.o
  65. $(SBLAS1): $(FRC)
  66. CBLAS1 = scabs1.o scasum.o scnrm2.o icamax.o caxpy.o ccopy.o \
  67. cdotc.o cdotu.o csscal.o crotg.o cscal.o cswap.o csrot.o
  68. $(CBLAS1): $(FRC)
  69. DBLAS1 = idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o \
  70. drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o
  71. $(DBLAS1): $(FRC)
  72. ZBLAS1 = dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zcopy.o \
  73. zdotc.o zdotu.o zdscal.o zrotg.o zscal.o zswap.o zdrot.o
  74. $(ZBLAS1): $(FRC)
  75. CB1AUX = isamax.o sasum.o saxpy.o scopy.o snrm2.o sscal.o
  76. $(CB1AUX): $(FRC)
  77. ZB1AUX = idamax.o dasum.o daxpy.o dcopy.o dnrm2.o dscal.o
  78. $(ZB1AUX): $(FRC)
  79. #---------------------------------------------------------------------
  80. # The following line defines auxiliary routines needed by both the
  81. # Level 2 and Level 3 BLAS. Comment it out only if you already have
  82. # both the Level 2 and 3 BLAS.
  83. #---------------------------------------------------------------------
  84. ALLBLAS = lsame.o xerbla.o xerbla_array.o
  85. $(ALLBLAS): $(FRC)
  86. #---------------------------------------------------------
  87. # Comment out the next 4 definitions if you already have
  88. # the Level 2 BLAS.
  89. #---------------------------------------------------------
  90. SBLAS2 = sgemv.o sgbmv.o ssymv.o ssbmv.o sspmv.o \
  91. strmv.o stbmv.o stpmv.o strsv.o stbsv.o stpsv.o \
  92. sger.o ssyr.o sspr.o ssyr2.o sspr2.o
  93. $(SBLAS2): $(FRC)
  94. CBLAS2 = cgemv.o cgbmv.o chemv.o chbmv.o chpmv.o \
  95. ctrmv.o ctbmv.o ctpmv.o ctrsv.o ctbsv.o ctpsv.o \
  96. cgerc.o cgeru.o cher.o chpr.o cher2.o chpr2.o
  97. $(CBLAS2): $(FRC)
  98. DBLAS2 = dgemv.o dgbmv.o dsymv.o dsbmv.o dspmv.o \
  99. dtrmv.o dtbmv.o dtpmv.o dtrsv.o dtbsv.o dtpsv.o \
  100. dger.o dsyr.o dspr.o dsyr2.o dspr2.o
  101. $(DBLAS2): $(FRC)
  102. ZBLAS2 = zgemv.o zgbmv.o zhemv.o zhbmv.o zhpmv.o \
  103. ztrmv.o ztbmv.o ztpmv.o ztrsv.o ztbsv.o ztpsv.o \
  104. zgerc.o zgeru.o zher.o zhpr.o zher2.o zhpr2.o
  105. $(ZBLAS2): $(FRC)
  106. #---------------------------------------------------------
  107. # Comment out the next 4 definitions if you already have
  108. # the Level 3 BLAS.
  109. #---------------------------------------------------------
  110. SBLAS3 = sgemm.o ssymm.o ssyrk.o ssyr2k.o strmm.o strsm.o
  111. $(SBLAS3): $(FRC)
  112. CBLAS3 = cgemm.o csymm.o csyrk.o csyr2k.o ctrmm.o ctrsm.o \
  113. chemm.o cherk.o cher2k.o
  114. $(CBLAS3): $(FRC)
  115. DBLAS3 = dgemm.o dsymm.o dsyrk.o dsyr2k.o dtrmm.o dtrsm.o
  116. $(DBLAS3): $(FRC)
  117. ZBLAS3 = zgemm.o zsymm.o zsyrk.o zsyr2k.o ztrmm.o ztrsm.o \
  118. zhemm.o zherk.o zher2k.o
  119. $(ZBLAS3): $(FRC)
  120. ALLOBJ = $(SBLAS1) $(SBLAS2) $(SBLAS3) $(DBLAS1) $(DBLAS2) $(DBLAS3) \
  121. $(CBLAS1) $(CBLAS2) $(CBLAS3) $(ZBLAS1) \
  122. $(ZBLAS2) $(ZBLAS3) $(ALLBLAS)
  123. $(BLASLIB): $(ALLOBJ)
  124. $(AR) $(ARFLAGS) $@ $^
  125. $(RANLIB) $@
  126. .PHONY: single double complex complex16
  127. single: $(SBLAS1) $(ALLBLAS) $(SBLAS2) $(SBLAS3)
  128. $(AR) $(ARFLAGS) $(BLASLIB) $^
  129. $(RANLIB) $(BLASLIB)
  130. double: $(DBLAS1) $(ALLBLAS) $(DBLAS2) $(DBLAS3)
  131. $(AR) $(ARFLAGS) $(BLASLIB) $^
  132. $(RANLIB) $(BLASLIB)
  133. complex: $(CBLAS1) $(CB1AUX) $(ALLBLAS) $(CBLAS2) $(CBLAS3)
  134. $(AR) $(ARFLAGS) $(BLASLIB) $^
  135. $(RANLIB) $(BLASLIB)
  136. complex16: $(ZBLAS1) $(ZB1AUX) $(ALLBLAS) $(ZBLAS2) $(ZBLAS3)
  137. $(AR) $(ARFLAGS) $(BLASLIB) $^
  138. $(RANLIB) $(BLASLIB)
  139. FRC:
  140. @FRC=$(FRC)
  141. .PHONY: clean cleanobj cleanlib
  142. clean: cleanobj cleanlib
  143. cleanobj:
  144. rm -f *.o
  145. cleanlib:
  146. #rm -f $(BLASLIB) # May point to a system lib, e.g. -lblas