hypre/Makefile.sample
2008-07-18 01:34:48 +00:00

80 lines
2.3 KiB
Makefile

#BHEADER**********************************************************************
# Copyright (c) 2008, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
# This file is part of HYPRE. See file COPYRIGHT for details.
#
# HYPRE is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License (as published by the Free
# Software Foundation) version 2.1 dated February 1999.
#
# $Revision$
#EHEADER**********************************************************************
#### This is a template file for a Makefile to create a libHYPRE_*
#### Lines not relevant to your sub-directory can be deleted.
#### The name of your resulting file MUST be Makefile
#### ALL of the configured information is in the included file
#### named Makefile.config
include ../config/Makefile.config
CINCLUDES = ## any include files needed for C code ##
CXXINCLUDES = ## any include files needed for CXX code ##
F77INCLUDES = ## any include files needed for F77 code ##
C_COMPILE_FLAGS = ## any needed CFLAGS ##
CXX_COMPILE_FLAGS = ## any needed CXXFLAGS ##
F77_COMPILE_FLAGS = ## any needed FFLAGS ##
HEADERS = ## all *.h files ##
FILESC = ## all C source code files ##
FILESCXX = ## all CXX source code files ##
FILESF = ## all F source code files ##
FILES = ${FILESC} ${FILESCXX} ${FILESF}
OBJSC = ${FILES:.c=.o} ## object files for C ##
OBJSCXX = ${FILES:.cxx=.o} ## object files for C++ ##
OBJSF = ${FILES:.f=.o} ## object files for F77 ##
OBJS = ${OBJSC} ${OBJSCXX} ${OBJSF}
##################################################################
# Targets
##################################################################
all: libHYPRE_*** ${HYPRE_LIB_SUFFIX}
@cp -fp $(srcdir)/***.h $(HYPRE_BUILD_DIR)/include/.
@cp -fp libHYPRE* $(HYPRE_BUILD_DIR)/lib/.
install: all
@cp -fp $(srcdir)/***.h $(HYPRE_INC_INSTALL)/.
@cp -fp libHYPRE* $(HYPRE_LIB_INSTALL)/.
clean:
@rm -f *.o libHYPRE*
distclean: clean
##################################################################
# Rules
##################################################################
libHYPRE_***.a: ${OBJS}
@echo "Building $@ ... "
${AR} $@ ${OBJS}
${RANLIB} $@
libHYPRE_***.so: ${OBJS}
@echo "Building $@ ... "
${LINK_CC} -o $@ ${OBJS}
${OBJS}: ${HEADERS}