hypre/Makefile.in
falgout 118ec6dab6 Moved semi-structured stuff (SStruct) out of beta.
Still need to add a test suite to autotest.
2000-09-01 00:58:37 +00:00

246 lines
5.4 KiB
Makefile

#BHEADER***********************************************************************
# (c) 1998 The Regents of the University of California
#
# See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
# notice, contact person, and disclaimer.
#
# $Revision$
#EHEADER***********************************************************************
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
HYPRE_BASIC_DIRS =\
blas\
utilities
#These are the directories for the structured interface
HYPRE_STRUCT_DIRS =\
struct_matrix_vector\
struct_linear_solvers
#These are the directories for the semi-structured interface
HYPRE_SSTRUCT_DIRS =\
sstruct_matrix_vector\
sstruct_linear_solvers
#These are the directories for the IJ interface
HYPRE_IJ_DIRS =\
seq_matrix_vector\
parcsr_matrix_vector\
distributed_matrix\
matrix_matrix\
IJ_matrix_vector\
distributed_linear_solvers/pilut\
distributed_linear_solvers/ParaSails\
parcsr_linear_solvers
#These are the directories for the FEI
HYPRE_FEI_DIRS =\
FEI_matrix_vector/fei-hypre
# FEI_matrix_vector/fei-base\
# FEI_matrix_vector/isis-mv
HYPRE_FEI_LIBFILES =\
libHYPRE_parcsr_ls.a libHYPRE_DistributedMatrix.a \
libHYPRE_parcsr_mv.a libHYPRE_FEI.a \
libHYPRE_seq_mv.a libHYPRE_IJ_mv.a \
libHYPRE_DistributedMatrixPilutSolver.a \
libHYPRE_utilities.a libHYPRE_MatrixMatrix.a libHYPRE_ParaSails.a
# These are directories that are officially in HYPRE
HYPRE_DIRS =\
${HYPRE_BASIC_DIRS}\
${HYPRE_STRUCT_DIRS}\
${HYPRE_SSTRUCT_DIRS}\
${HYPRE_IJ_DIRS}\
${HYPRE_FEI_DIRS}
# These are directories that are not yet officially in HYPRE
HYPRE_EXTRA_DIRS =\
seq_linear_solvers/pamg\
structIJ_matrix_vector\
CI_struct_matrix_vector\
CI_struct_linear_solvers @HYPRE_PETSCLIBDIRS@
all: struct sstruct IJ fei
@ \
echo "Making test drivers ..."; \
(cd test; make veryclean; make); \
echo ""
beta: all
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_EXTRA_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done; \
echo "Making beta test drivers ..."; \
(cd test; make beta); \
echo ""
struct: base
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_STRUCT_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done
sstruct: struct IJ
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_SSTRUCT_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done
IJ: base
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_IJ_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done
fei: IJ
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_FEI_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done; \
mkdir -p hypre/tmp; \
for i in ${HYPRE_FEI_LIBFILES}; \
do \
(cp hypre/lib/$$i hypre/tmp; cd hypre/tmp; ar x $$i; rm -f ___*;);\
if [ $$i = "libHYPRE_DistributedMatrixPilutSolver.a" ]; then \
(cd hypre/tmp; mv -f qsort.o psort.o;); \
(cd hypre/tmp; mv -f qsort_si.o psort_si.o;); \
fi; \
done; \
(cd hypre/tmp; ar rcu ../lib/libHYPRE_LSI.a *.o;); \
rm -rf hypre/tmp
# special autotest target
nofei: IJ
@ \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
for i in ${HYPRE_FEI_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make veryclean); \
(cd $$i; make DEFINES=-DNOFEI install); \
echo ""; \
fi; \
done; \
mkdir -p hypre/tmp; \
for i in ${HYPRE_FEI_LIBFILES}; \
do \
(cp hypre/lib/$$i hypre/tmp; cd hypre/tmp; ar x $$i; rm -f ___*;);\
if [ $$i = "libHYPRE_DistributedMatrixPilutSolver.a" ]; then \
(cd hypre/tmp; mv -f qsort.o psort.o;); \
(cd hypre/tmp; mv -f qsort_si.o psort_si.o;); \
fi; \
done; \
(cd hypre/tmp; ar rcu ../lib/libHYPRE_LSI.a *.o;); \
rm -rf hypre/tmp
base:
@ \
mkdir -p hypre/include; \
mkdir -p hypre/lib; \
HYPRE_INSTALL_DIR=`pwd`/hypre; \
export HYPRE_INSTALL_DIR; \
cp -f HYPRE_config.h $$HYPRE_INSTALL_DIR/include/.; \
cp -f HYPRE.h $$HYPRE_INSTALL_DIR/include/.; \
for i in ${HYPRE_BASIC_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Making $$i ..."; \
(cd $$i; make install); \
echo ""; \
fi; \
done
install: all
@ \
if [ ! "$$HYPRE_INSTALL_DIR" ]; \
then \
echo "Error: set the HYPRE_INSTALL_DIR environment variable"; \
exit 1; \
fi; \
if [ ! -d $$HYPRE_INSTALL_DIR ]; \
then \
echo "Error: no directory HYPRE_INSTALL_DIR=$$HYPRE_INSTALL_DIR"; \
exit 1; \
fi; \
echo "Installing hypre ..."; \
cp -fr hypre/* $$HYPRE_INSTALL_DIR/.; \
rm -Rf hypre
clean:
@ \
for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Cleaning $$i ..."; \
(cd $$i; make clean); \
fi; \
done; \
echo "Cleaning test ..."; \
(cd test; make clean)
veryclean:
@ \
rm -Rf hypre; \
for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS}; \
do \
if [ -d $$i ]; \
then \
echo "Very-cleaning $$i ..."; \
(cd $$i; make veryclean); \
fi; \
done; \
echo "Very-cleaning test ..."; \
(cd test; make veryclean)