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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #######################################################################
  2. # This is the makefile to create a library of the test matrix
  3. # generators used in LAPACK. The files are organized as follows:
  4. #
  5. # SCATGEN -- Auxiliary routines called from single precision
  6. # DZATGEN -- Auxiliary routines called from double precision
  7. # SMATGEN -- Single precision real matrix generation routines
  8. # CMATGEN -- Single precision complex matrix generation routines
  9. # DMATGEN -- Double precision real matrix generation routines
  10. # ZMATGEN -- Double precision complex matrix generation routines
  11. #
  12. # The library can be set up to include routines for any combination
  13. # of the four precisions. To create or add to the library, enter make
  14. # followed by one or more of the precisions desired. Some examples:
  15. # make single
  16. # make single complex
  17. # make single double complex complex16
  18. # Alternatively, the command
  19. # make
  20. # without any arguments creates a library of all four precisions.
  21. # The library is called
  22. # tmglib.a
  23. # and is created at the LAPACK directory level.
  24. #
  25. # To remove the object files after the library is created, enter
  26. # make cleanobj
  27. # On some systems, you can force the source files to be recompiled by
  28. # entering (for example)
  29. # make single FRC=FRC
  30. #
  31. #######################################################################
  32. TOPSRCDIR = ../..
  33. include $(TOPSRCDIR)/make.inc
  34. ifneq ($(C_LAPACK), 1)
  35. .SUFFIXES:
  36. .SUFFIXES: .f .o
  37. .f.o:
  38. $(FC) $(FFLAGS) -c -o $@ $<
  39. endif
  40. ifneq "$(or $(BUILD_SINGLE),$(BUILD_COMPLEX))" ""
  41. SCATGEN = slatm1.o slatm7.o slaran.o slarnd.o
  42. endif
  43. ifeq ($(BUILD_SINGLE),1)
  44. SMATGEN = slatms.o slatme.o slatmr.o slatmt.o \
  45. slagge.o slagsy.o slakf2.o slarge.o slaror.o slarot.o slatm2.o \
  46. slatm3.o slatm5.o slatm6.o slahilb.o
  47. endif
  48. ifeq ($(BUILD_COMPLEX),1)
  49. CMATGEN = clatms.o clatme.o clatmr.o clatmt.o \
  50. clagge.o claghe.o clagsy.o clakf2.o clarge.o claror.o clarot.o \
  51. clatm1.o clarnd.o clatm2.o clatm3.o clatm5.o clatm6.o clahilb.o
  52. endif
  53. ifneq "$(or $(BUILD_DOUBLE),$(BUILD_COMPLEX16))" ""
  54. DZATGEN = dlatm1.o dlatm7.o dlaran.o dlarnd.o
  55. endif
  56. ifeq ($(BUILD_DOUBLE),1)
  57. DMATGEN = dlatms.o dlatme.o dlatmr.o dlatmt.o \
  58. dlagge.o dlagsy.o dlakf2.o dlarge.o dlaror.o dlarot.o dlatm2.o \
  59. dlatm3.o dlatm5.o dlatm6.o dlahilb.o
  60. endif
  61. ifeq ($(BUILD_COMPLEX16),1)
  62. ZMATGEN = zlatms.o zlatme.o zlatmr.o zlatmt.o \
  63. zlagge.o zlaghe.o zlagsy.o zlakf2.o zlarge.o zlaror.o zlarot.o \
  64. zlatm1.o zlarnd.o zlatm2.o zlatm3.o zlatm5.o zlatm6.o zlahilb.o
  65. endif
  66. .PHONY: all
  67. .NOTPARALLEL:
  68. all: $(TMGLIB)
  69. ALLOBJ = $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN) $(ZMATGEN) \
  70. $(DZATGEN)
  71. $(TMGLIB): $(ALLOBJ)
  72. $(AR) $(ARFLAGS) $@ $^
  73. $(RANLIB) $@
  74. .PHONY: single complex double complex16
  75. single: $(SMATGEN) $(SCATGEN)
  76. $(AR) $(ARFLAGS) $(TMGLIB) $^
  77. $(RANLIB) $(TMGLIB)
  78. complex: $(CMATGEN) $(SCATGEN)
  79. $(AR) $(ARFLAGS) $(TMGLIB) $^
  80. $(RANLIB) $(TMGLIB)
  81. double: $(DMATGEN) $(DZATGEN)
  82. $(AR) $(ARFLAGS) $(TMGLIB) $^
  83. $(RANLIB) $(TMGLIB)
  84. complex16: $(ZMATGEN) $(DZATGEN)
  85. $(AR) $(ARFLAGS) $(TMGLIB) $^
  86. $(RANLIB) $(TMGLIB)
  87. ifdef FRC
  88. $(SCATGEN): $(FRC)
  89. $(SMATGEN): $(FRC)
  90. $(CMATGEN): $(FRC)
  91. $(DZATGEN): $(FRC)
  92. $(DMATGEN): $(FRC)
  93. $(ZMATGEN): $(FRC)
  94. FRC:
  95. @FRC=$(FRC)
  96. endif
  97. .PHONY: clean cleanobj cleanlib
  98. clean: cleanobj cleanlib
  99. cleanobj:
  100. rm -f *.o
  101. cleanlib:
  102. rm -f $(TMGLIB)
  103. ifneq ($(C_LAPACK), 1)
  104. ifeq ($(filter $(BUILD_SINGLE) $(BUILD_COMPLEX),1),)
  105. slaran.o: slaran.f ; $(FC) $(FFLAGS_NOOPT) -c -o $@ $<
  106. endif
  107. ifeq ($(filter $(BUILD_DOUBLE) $(BUILD_COMPLEX16),1),)
  108. dlaran.o: dlaran.f ; $(FC) $(FFLAGS_NOOPT) -c -o $@ $<
  109. endif
  110. else
  111. ifeq ($(filter $(BUILD_SINGLE) $(BUILD_COMPLEX),1),)
  112. slaran.o: slaran.c ; $(CC) $(CFLAGS) -O0 -c -o $@ $<
  113. endif
  114. ifeq ($(filter $(BUILD_DOUBLE) $(BUILD_COMPLEX16),1),)
  115. dlaran.o: dlaran.c ; $(CC) $(CFLAGS) -O0 -c -o $@ $<
  116. endif
  117. endif