2006-07-28 07:26:57 +08:00
|
|
|
#BHEADER**********************************************************************
|
2008-07-18 09:34:48 +08:00
|
|
|
# Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
2006-07-28 07:26:57 +08:00
|
|
|
# Produced at the Lawrence Livermore National Laboratory.
|
2008-07-18 09:34:48 +08:00
|
|
|
# This file is part of HYPRE. See file COPYRIGHT for details.
|
2006-07-28 07:26:57 +08:00
|
|
|
#
|
2006-09-23 06:06:21 +08:00
|
|
|
# HYPRE is free software; you can redistribute it and/or modify it under the
|
2008-07-18 09:34:48 +08:00
|
|
|
# terms of the GNU Lesser General Public License (as published by the Free
|
|
|
|
|
# Software Foundation) version 2.1 dated February 1999.
|
1998-10-08 00:48:47 +08:00
|
|
|
#
|
2004-12-02 02:56:39 +08:00
|
|
|
# $Revision$
|
2006-07-28 07:26:57 +08:00
|
|
|
#EHEADER**********************************************************************
|
|
|
|
|
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
# Include all variables defined by configure
|
2005-01-27 06:00:49 +08:00
|
|
|
include config/Makefile.config
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
# These are the directories for internal blas, lapack and general utilities
|
2010-01-14 09:16:24 +08:00
|
|
|
HYPRE_BASIC_DIRS =\
|
|
|
|
|
${HYPRE_BLAS_SRC_DIR}\
|
2005-09-27 05:59:55 +08:00
|
|
|
${HYPRE_LAPACK_SRC_DIR}\
|
2010-01-14 09:16:24 +08:00
|
|
|
utilities
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2010-01-14 09:16:24 +08:00
|
|
|
#These are the directories for multivector
|
|
|
|
|
HYPRE_MULTIVEC_DIRS =\
|
|
|
|
|
multivector
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2010-01-14 09:16:24 +08:00
|
|
|
# These are the directories for the generic Krylov solvers
|
|
|
|
|
HYPRE_KRYLOV_DIRS =\
|
|
|
|
|
krylov
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
#These are the directories for the IJ interface
|
|
|
|
|
HYPRE_IJ_DIRS =\
|
|
|
|
|
seq_mv\
|
|
|
|
|
parcsr_mv\
|
2005-11-16 07:35:34 +08:00
|
|
|
parcsr_block_mv\
|
2004-12-02 02:56:39 +08:00
|
|
|
distributed_matrix\
|
|
|
|
|
IJ_mv\
|
2010-01-14 09:16:24 +08:00
|
|
|
matrix_matrix\
|
2004-12-02 02:56:39 +08:00
|
|
|
distributed_ls\
|
|
|
|
|
parcsr_ls
|
|
|
|
|
|
2010-01-14 09:16:24 +08:00
|
|
|
#These are the directories for the structured interface
|
|
|
|
|
HYPRE_STRUCT_DIRS =\
|
|
|
|
|
struct_mv\
|
|
|
|
|
struct_ls
|
|
|
|
|
|
|
|
|
|
#These are the directories for the semi-structured interface
|
|
|
|
|
HYPRE_SSTRUCT_DIRS =\
|
|
|
|
|
sstruct_mv\
|
|
|
|
|
sstruct_ls
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
#These are the directories for the FEI
|
2006-03-08 07:21:13 +08:00
|
|
|
HYPRE_FEI_DIRS = ${HYPRE_FEI_SRC_DIR}
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
#This is the lib directory
|
2005-01-11 02:59:18 +08:00
|
|
|
HYPRE_LIBS_DIRS = lib
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
#This is the documentation directory
|
2005-01-11 02:59:18 +08:00
|
|
|
HYPRE_DOCS_DIRS = docs
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
#This is the test-driver directory
|
|
|
|
|
HYPRE_TEST_DIRS = test
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
# These are directories that are officially in HYPRE
|
|
|
|
|
HYPRE_DIRS =\
|
|
|
|
|
${HYPRE_BASIC_DIRS}\
|
2010-01-14 09:16:24 +08:00
|
|
|
${HYPRE_MULTIVEC_DIRS}\
|
2004-12-02 02:56:39 +08:00
|
|
|
${HYPRE_KRYLOV_DIRS}\
|
2010-01-14 09:16:24 +08:00
|
|
|
${HYPRE_IJ_DIRS}\
|
2004-12-02 02:56:39 +08:00
|
|
|
${HYPRE_STRUCT_DIRS}\
|
|
|
|
|
${HYPRE_SSTRUCT_DIRS}\
|
|
|
|
|
${HYPRE_FEI_DIRS}\
|
2005-01-11 02:59:18 +08:00
|
|
|
${HYPRE_LIBS_DIRS}
|
2004-12-02 02:56:39 +08:00
|
|
|
|
|
|
|
|
# These are directories that are not yet officially in HYPRE
|
|
|
|
|
HYPRE_EXTRA_DIRS =\
|
2005-01-11 02:59:18 +08:00
|
|
|
${HYPRE_DOCS_DIRS}\
|
|
|
|
|
${HYPRE_TEST_DIRS}\
|
2008-07-24 08:25:12 +08:00
|
|
|
seq_ls/pamg
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
#################################################################
|
|
|
|
|
# Targets
|
|
|
|
|
#################################################################
|
2003-12-11 08:42:22 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
all:
|
2004-12-02 02:56:39 +08:00
|
|
|
@ \
|
2005-01-11 02:59:18 +08:00
|
|
|
mkdir -p ${HYPRE_BUILD_DIR}/include; \
|
|
|
|
|
mkdir -p ${HYPRE_BUILD_DIR}/lib; \
|
2010-01-15 02:17:53 +08:00
|
|
|
cp -fpPR HYPRE_config.h ${HYPRE_BUILD_DIR}/include/.; \
|
|
|
|
|
cp -fpPR $(srcdir)/HYPRE.h ${HYPRE_BUILD_DIR}/include/.; \
|
|
|
|
|
cp -fpPR $(srcdir)/HYPREf.h ${HYPRE_BUILD_DIR}/include/.; \
|
2006-03-30 03:07:04 +08:00
|
|
|
for i in ${HYPRE_DIRS} ${HYPRE_BABEL_DIRS} ${HYPRE_EXAMPLE_DIRS}; \
|
2004-12-02 02:56:39 +08:00
|
|
|
do \
|
2005-01-11 02:59:18 +08:00
|
|
|
echo "Making $$i ..."; \
|
|
|
|
|
(cd $$i && $(MAKE) $@); \
|
|
|
|
|
echo ""; \
|
2004-12-02 02:56:39 +08:00
|
|
|
done
|
2003-12-11 08:42:22 +08:00
|
|
|
|
2005-01-11 02:59:18 +08:00
|
|
|
help:
|
|
|
|
|
@echo " "
|
|
|
|
|
@echo "************************************************************"
|
|
|
|
|
@echo " HYPRE Make System Targets"
|
|
|
|
|
@echo " (using GNU-standards)"
|
|
|
|
|
@echo " "
|
|
|
|
|
@echo "all:"
|
|
|
|
|
@echo " default target in all directories"
|
|
|
|
|
@echo " compile the entire program"
|
|
|
|
|
@echo " does not rebuild documentation"
|
|
|
|
|
@echo " "
|
|
|
|
|
@echo "help:"
|
|
|
|
|
@echo " prints details of each target"
|
|
|
|
|
@echo " "
|
|
|
|
|
@echo "install:"
|
|
|
|
|
@echo " compile the program and copy executables, libraries, etc"
|
|
|
|
|
@echo " to the file names where they reside for actual use"
|
2005-01-11 03:31:44 +08:00
|
|
|
@echo " executes mkinstalldirs script to create directories needed"
|
2005-01-11 02:59:18 +08:00
|
|
|
@echo " "
|
|
|
|
|
@echo "clean:"
|
|
|
|
|
@echo " deletes all files from the current directory that are normally"
|
|
|
|
|
@echo " created by building the program"
|
|
|
|
|
@echo " "
|
|
|
|
|
@echo "distclean:"
|
|
|
|
|
@echo " deletes all files from the current directory that are"
|
|
|
|
|
@echo " created by configuring or building the program"
|
|
|
|
|
@echo " "
|
2005-01-11 05:48:18 +08:00
|
|
|
@echo "tags:"
|
|
|
|
|
@echo " runs etags to create tags table"
|
|
|
|
|
@echo " file is named TAGS and is saved in current directory"
|
|
|
|
|
@echo " "
|
2005-01-11 02:59:18 +08:00
|
|
|
@echo "test:"
|
|
|
|
|
@echo " depends on the all target to be completed"
|
|
|
|
|
@echo " removes existing temporary installation sub-directory"
|
|
|
|
|
@echo " creates a temporary installation sub-directory"
|
|
|
|
|
@echo " copies all libHYPRE* and *.h files to the temporary locations"
|
|
|
|
|
@echo " builds the test drivers; linking to the temporary installation"
|
|
|
|
|
@echo " directories to simulate how application codes will link to HYPRE"
|
|
|
|
|
@echo " "
|
2007-06-02 08:37:28 +08:00
|
|
|
@echo "check:"
|
|
|
|
|
@echo " runs a small driver test to verify a working library"
|
|
|
|
|
@echo " use CHECKRUN=<mpirun routine> if needed"
|
|
|
|
|
@echo " "
|
2005-01-11 02:59:18 +08:00
|
|
|
@echo "************************************************************"
|
|
|
|
|
|
|
|
|
|
test: all
|
2004-12-02 02:56:39 +08:00
|
|
|
@ \
|
2005-01-11 02:59:18 +08:00
|
|
|
echo "Making test drivers ..."; \
|
2006-04-14 05:13:57 +08:00
|
|
|
(cd test; $(MAKE) clean; $(MAKE) all)
|
2004-12-02 02:56:39 +08:00
|
|
|
|
2008-07-24 08:25:12 +08:00
|
|
|
check:
|
2007-06-02 08:37:28 +08:00
|
|
|
@ \
|
|
|
|
|
echo "Checking the library ..."; \
|
|
|
|
|
(cd test; $(MAKE) all); \
|
|
|
|
|
(cd test; $(CHECKRUN) ij 2> ij.err); \
|
|
|
|
|
(cd test; $(CHECKRUN) struct 2> struct.err); \
|
|
|
|
|
(cd test; cp -f TEST_sstruct/sstruct.in.default .; $(CHECKRUN) sstruct 2> sstruct.err); \
|
|
|
|
|
(cd test; ls -l ij.err struct.err sstruct.err)
|
|
|
|
|
|
2004-12-02 02:56:39 +08:00
|
|
|
install: all
|
2011-01-04 04:00:19 +08:00
|
|
|
@ \
|
|
|
|
|
echo "Installing hypre ..."; \
|
|
|
|
|
${HYPRE_SRC_TOP_DIR}/config/mkinstalldirs ${HYPRE_LIB_INSTALL} ${HYPRE_INC_INSTALL}; \
|
2011-05-18 00:42:45 +08:00
|
|
|
HYPRE_PWD=`pwd`; \
|
2011-01-04 04:00:19 +08:00
|
|
|
cd ${HYPRE_BUILD_DIR}/lib; HYPRE_FROMDIR=`pwd`; \
|
2011-05-18 00:42:45 +08:00
|
|
|
cd $$HYPRE_PWD; \
|
2011-01-04 04:00:19 +08:00
|
|
|
cd ${HYPRE_LIB_INSTALL}; HYPRE_TODIR=`pwd`; \
|
|
|
|
|
if [ "$$HYPRE_FROMDIR" != "$$HYPRE_TODIR" ]; \
|
|
|
|
|
then \
|
|
|
|
|
cp -fpPR $$HYPRE_FROMDIR/* $$HYPRE_TODIR; \
|
|
|
|
|
fi; \
|
|
|
|
|
cd ${HYPRE_BUILD_DIR}/include; HYPRE_FROMDIR=`pwd`; \
|
2011-05-18 00:42:45 +08:00
|
|
|
cd $$HYPRE_PWD; \
|
2011-01-04 04:00:19 +08:00
|
|
|
cd ${HYPRE_INC_INSTALL}; HYPRE_TODIR=`pwd`; \
|
|
|
|
|
if [ "$$HYPRE_FROMDIR" != "$$HYPRE_TODIR" ]; \
|
|
|
|
|
then \
|
|
|
|
|
cp -fpPR $$HYPRE_FROMDIR/* $$HYPRE_TODIR; \
|
|
|
|
|
fi; \
|
2011-05-18 00:42:45 +08:00
|
|
|
cd $$HYPRE_PWD; \
|
2011-01-04 04:00:19 +08:00
|
|
|
chmod -R a+rX,u+w,go-w ${HYPRE_LIB_INSTALL}; \
|
|
|
|
|
chmod -R a+rX,u+w,go-w ${HYPRE_INC_INSTALL}; \
|
|
|
|
|
echo
|
2005-01-11 03:31:44 +08:00
|
|
|
|
2004-12-02 02:56:39 +08:00
|
|
|
clean:
|
2003-05-17 09:24:22 +08:00
|
|
|
@ \
|
2008-07-24 08:25:12 +08:00
|
|
|
rm -Rf hypre; \
|
2006-03-16 05:49:51 +08:00
|
|
|
for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS} ${HYPRE_BABEL_DIRS} ${HYPRE_EXAMPLE_DIRS}; \
|
2003-05-17 09:40:54 +08:00
|
|
|
do \
|
2010-01-14 09:16:24 +08:00
|
|
|
if [ -f $$i/Makefile ]; \
|
2003-05-17 09:40:54 +08:00
|
|
|
then \
|
2004-12-02 02:56:39 +08:00
|
|
|
echo "Cleaning $$i ..."; \
|
2005-01-11 02:59:18 +08:00
|
|
|
(cd $$i && $(MAKE) $@); \
|
2003-05-17 09:40:54 +08:00
|
|
|
fi; \
|
2005-01-11 02:59:18 +08:00
|
|
|
done
|
2005-08-16 07:01:21 +08:00
|
|
|
rm -rf tca.map pchdir *inslog*
|
2003-12-11 08:42:22 +08:00
|
|
|
|
2008-07-25 00:53:18 +08:00
|
|
|
distclean:
|
|
|
|
|
@ \
|
|
|
|
|
rm -Rf hypre; \
|
|
|
|
|
for i in ${HYPRE_DIRS} ${HYPRE_EXTRA_DIRS} ${HYPRE_BABEL_DIRS} ${HYPRE_EXAMPLE_DIRS}; \
|
|
|
|
|
do \
|
|
|
|
|
if [ -d $$i ]; \
|
|
|
|
|
then \
|
|
|
|
|
echo "Dist-Cleaning $$i ..."; \
|
|
|
|
|
(cd $$i && $(MAKE) $@); \
|
|
|
|
|
fi; \
|
|
|
|
|
done
|
|
|
|
|
rm -rf tca.map pchdir *inslog*
|
2005-01-11 03:31:44 +08:00
|
|
|
rm -rf ./config/Makefile.config
|
2005-01-11 05:48:18 +08:00
|
|
|
rm -rf ./TAGS
|
2005-03-10 01:20:12 +08:00
|
|
|
rm -rf ./autom4te.cache
|
|
|
|
|
rm -rf ./config.log
|
|
|
|
|
rm -rf ./config.status
|
2006-11-30 08:54:16 +08:00
|
|
|
rm -rf ./HYPRE_config.h
|
2005-01-11 05:48:18 +08:00
|
|
|
|
|
|
|
|
tags:
|
2010-12-03 06:39:25 +08:00
|
|
|
find . -name "*.c" -o -name "*.C" -o -name "*.h" -o \
|
2010-03-18 07:26:42 +08:00
|
|
|
-name "*.c??" -o -name "*.h??" -o -name "*.f" | etags -
|