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 33TOPSRCDIR = ../.. 34include $(TOPSRCDIR)/make.inc 35 36ifneq "$(or $(BUILD_SINGLE),$(BUILD_COMPLEX))" "" 37SCATGEN = slatm1.o slatm7.o slaran.o slarnd.o 38endif 39 40ifeq ($(BUILD_SINGLE),1) 41SMATGEN = slatms.o slatme.o slatmr.o slatmt.o \ 42 slagge.o slagsy.o slakf2.o slarge.o slaror.o slarot.o slatm2.o \ 43 slatm3.o slatm5.o slatm6.o slahilb.o 44endif 45 46ifeq ($(BUILD_COMPLEX),1) 47CMATGEN = clatms.o clatme.o clatmr.o clatmt.o \ 48 clagge.o claghe.o clagsy.o clakf2.o clarge.o claror.o clarot.o \ 49 clatm1.o clarnd.o clatm2.o clatm3.o clatm5.o clatm6.o clahilb.o 50endif 51 52ifneq "$(or $(BUILD_DOUBLE),$(BUILD_COMPLEX16))" "" 53DZATGEN = dlatm1.o dlatm7.o dlaran.o dlarnd.o 54endif 55 56ifeq ($(BUILD_DOUBLE),1) 57DMATGEN = 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 60endif 61 62ifeq ($(BUILD_COMPLEX16),1) 63ZMATGEN = zlatms.o zlatme.o zlatmr.o zlatmt.o \ 64 zlagge.o zlaghe.o zlagsy.o zlakf2.o zlarge.o zlaror.o zlarot.o \ 65 zlatm1.o zlarnd.o zlatm2.o zlatm3.o zlatm5.o zlatm6.o zlahilb.o 66endif 67 68.PHONY: all 69all: $(TMGLIB) 70 71ALLOBJ = $(SMATGEN) $(CMATGEN) $(SCATGEN) $(DMATGEN) $(ZMATGEN) \ 72 $(DZATGEN) 73 74$(TMGLIB): $(ALLOBJ) 75 $(AR) $(ARFLAGS) $@ $^ 76 $(RANLIB) $@ 77 78.PHONY: single complex double complex16 79single: $(SMATGEN) $(SCATGEN) 80 $(AR) $(ARFLAGS) $(TMGLIB) $^ 81 $(RANLIB) $(TMGLIB) 82 83complex: $(CMATGEN) $(SCATGEN) 84 $(AR) $(ARFLAGS) $(TMGLIB) $^ 85 $(RANLIB) $(TMGLIB) 86 87double: $(DMATGEN) $(DZATGEN) 88 $(AR) $(ARFLAGS) $(TMGLIB) $^ 89 $(RANLIB) $(TMGLIB) 90 91complex16: $(ZMATGEN) $(DZATGEN) 92 $(AR) $(ARFLAGS) $(TMGLIB) $^ 93 $(RANLIB) $(TMGLIB) 94 95$(SCATGEN): $(FRC) 96$(SMATGEN): $(FRC) 97$(CMATGEN): $(FRC) 98$(DZATGEN): $(FRC) 99$(DMATGEN): $(FRC) 100$(ZMATGEN): $(FRC) 101 102FRC: 103 @FRC=$(FRC) 104 105.PHONY: clean cleanobj cleanlib 106clean: cleanobj cleanlib 107cleanobj: 108 rm -f *.o 109cleanlib: 110 rm -f $(TMGLIB) 111 112ifeq ($(filter $(BUILD_SINGLE) $(BUILD_COMPLEX),1),) 113slaran.o: slaran.f ; $(FC) $(FFLAGS_NOOPT) -c -o $@ $< 114endif 115ifeq ($(filter $(BUILD_DOUBLE) $(BUILD_COMPLEX16),1),) 116dlaran.o: dlaran.f ; $(FC) $(FFLAGS_NOOPT) -c -o $@ $< 117endif 118