1# 2# Makefile 3# 4# Copyright (C) 1996 Limit Point Systems, Inc. 5# 6# Author: Curtis Janssen <cljanss@ca.sandia.gov> 7# Maintainer: LPS 8# 9# This file is part of the SC Toolkit. 10# 11# The SC Toolkit is free software; you can redistribute it and/or modify 12# it under the terms of the GNU Library General Public License as published by 13# the Free Software Foundation; either version 2, or (at your option) 14# any later version. 15# 16# The SC Toolkit is distributed in the hope that it will be useful, 17# but WITHOUT ANY WARRANTY; without even the implied warranty of 18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19# GNU Library General Public License for more details. 20# 21# You should have received a copy of the GNU Library General Public License 22# along with the SC Toolkit; see the file COPYING.LIB. If not, write to 23# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 24# 25# The U.S. Government is granted a limited license as per AL 91-7. 26# 27 28TOPDIR=../../../.. 29ifndef SRCDIR 30 SRCDIR=$(shell pwd) 31endif 32 33include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile 34DEFINES += -DSRCDIR=\"$(SRCDIR)\" 35 36CLASS2TEXFLAGS = -clssection subsection -clssubsection subsubsection 37 38default:: $(DEPENDINCLUDE) 39 40CXXSRC = dim.cc \ 41 abstract.cc matrix.cc matrix_i.cc \ 42 block.cc blkiter.cc elemop.cc result.cc \ 43 local.cc localrect.cc localdiag.cc localsymm.cc localvect.cc \ 44 disthql.cc \ 45 dist.cc distrect.cc distdiag.cc distsymm.cc distvect.cc \ 46 repl.cc replrect.cc repldiag.cc replsymm.cc replvect.cc \ 47 blocked.cc \ 48 blockedvect.cc blockedrect.cc blockeddiag.cc blockedsymm.cc \ 49 matrix3.cc vector3.cc vector3_i.cc \ 50 util.cc 51 52TESTSRC = disttest.cc localtest.cc repltest.cc blockedtest.cc 53 54TESTPROGS = disttest localtest repltest blockedtest 55 56CSRC = cmatrix.c svd.c 57 58FSRC = pdsteqr.f 59 60LIBOBJ = $(CXXSRC:%.cc=%.$(OBJSUF)) $(CSRC:%.c=%.$(OBJSUF)) $(FSRC:%.f=%.$(OBJSUF)) 61 62INC = cmatrix.h matrix_i.h cmatrix.h matrix.h abstract.h blkiter.h local.h \ 63 result.h vector3.h vector3_i.h block.h matrix3.h elemop.h repl.h \ 64 blocked.h disthql.h dim.h 65 66GENINC = 67 68DEPENDINCLUDE = $(INC) $(GENINC) 69 70BIN_OR_LIB = LIB 71TARGET_TO_MAKE = libSCscmat 72 73TESTOBJ = matrixtest.$(OBJSUF) 74 75DISTFILES = $(CXXSRC) $(INC) scmat.h $(WEBSRC) Makefile LIBS.h \ 76 $(TESTSRC) $(TESTFILES) 77 78LIBS = $(shell $(LISTLIBS) $(INCLUDE) $(SRCDIR)/LIBS.h) 79 80matrixtest: 81 @echo The target must be a specialization such as localtest. 82 83localtest: localtest.$(OBJSUF) $(TESTOBJ) $(LIBS) 84 $(LTLINK) $(LD) $(LDFLAGS) -o localtest $^ $(SYSLIBS) $(LTLINKBINOPTS) 85 86repltest: repltest.$(OBJSUF) $(TESTOBJ) $(LIBS) 87 $(LTLINK) $(LD) $(LDFLAGS) -o repltest $^ $(SYSLIBS) $(LTLINKBINOPTS) 88 89disttest: disttest.$(OBJSUF) $(TESTOBJ) $(LIBS) 90 $(LTLINK) $(LD) $(LDFLAGS) -o disttest $^ $(SYSLIBS) $(LTLINKBINOPTS) 91 92blockedtest: blockedtest.$(OBJSUF) $(TESTOBJ) $(LIBS) 93 $(LTLINK) $(LD) $(LDFLAGS) -o blockedtest $^ $(SYSLIBS) $(LTLINKBINOPTS) 94 95repltest.$(OBJSUF): repltest.cc 96 $(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $< -o $@ 97 98disttest.$(OBJSUF): disttest.cc 99 $(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $< -o $@ 100 101TAGS: $(CXXSRC) $(CSRC) 102 etags $^ 103 104disthql.$(OBJSUF) disthql.d: f77sym.h 105 106f77sym.h: f77sym.in 107 $(MKF77SYM) $< $@ 108 109include $(SRCDIR)/$(TOPDIR)/lib/GlobalRules 110 111distclean:: 112 /bin/rm -f f77sym.h 113 114$(LIBOBJ:.$(OBJSUF)=.d): $(DEPENDINCLUDE) 115ifneq ($(DODEPEND),no) 116include $(CXXSRC:.cc=.d) $(CSRC:.c=.d) $(TESTSRC:%.cc=%.d) 117endif 118 119