1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
# -----------------------------------------------------------------
# $Revision: 1.12 $
# $Date: 2009/02/17 02:58:47 $
# -----------------------------------------------------------------
# Programmer(s): Radu Serban and Aaron Collier @ LLNL
# -----------------------------------------------------------------
# Copyright (c) 2002, The Regents of the University of California.
# Produced at the Lawrence Livermore National Laboratory.
# All rights reserved.
# For details, see the LICENSE file.
# -----------------------------------------------------------------
# Makefile for CVODES serial examples
#
# @configure_input@
# -----------------------------------------------------------------
SHELL = @SHELL@
srcdir = @srcdir@
top_builddir = @top_builddir@
builddir = @builddir@
abs_builddir = @abs_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
INSTALL = @INSTALL@
INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_FILE = @INSTALL_DATA@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
LAPACK_ENABLED = @LAPACK_ENABLED@
BLAS_LAPACK_LIBS = @BLAS_LAPACK_LIBS@
OBJ_EXT = @OBJEXT@
EXE_EXT = @EXEEXT@
EXS_INSTDIR = @EXS_INSTDIR@
top_srcdir = $(srcdir)/../../..
SUNDIALS_INCS = -I$(top_srcdir)/include -I$(top_builddir)/include
SUNDIALS_LIBS = $(top_builddir)/src/cvodes/libsundials_cvodes.la \
$(top_builddir)/src/nvec_ser/libsundials_nvecserial.la
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
rminstalldirs = $(SHELL) $(top_srcdir)/config/rminstalldirs
EXAMPLES = cvsAdvDiff_ASAi_bnd \
cvsAdvDiff_bnd \
cvsAdvDiff_FSA_non \
cvsDirectDemo_ls \
cvsDiurnal_FSA_kry \
cvsDiurnal_kry_bp \
cvsDiurnal_kry \
cvsFoodWeb_ASAi_kry \
cvsFoodWeb_ASAp_kry \
cvsHessian_ASA_FSA \
cvsKrylovDemo_ls \
cvsKrylovDemo_prec \
cvsRoberts_ASAi_dns \
cvsRoberts_dns \
cvsRoberts_dns_uw \
cvsRoberts_FSA_dns
EXAMPLES_BL = cvsAdvDiff_bndL \
cvsRoberts_dnsL
OBJECTS = ${EXAMPLES:=${OBJ_EXT}}
OBJECTS_BL = ${EXAMPLES_BL:=${OBJ_EXT}}
EXECS = ${EXAMPLES:=${EXE_EXT}}
EXECS_BL = ${EXAMPLES_BL:=${EXE_EXT}}
# ----------------------------------------------------------------------------------------------------------------------
all:
@for i in ${EXAMPLES} ; do \
$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(SUNDIALS_INCS) $(CFLAGS) -c $(srcdir)/$${i}.c -o $${i}${OBJ_EXT} ; \
$(LIBTOOL) --mode=link $(CC) -o $(builddir)/$${i}$(EXE_EXT) $(builddir)/$${i}${OBJ_EXT} $(CFLAGS) $(LDFLAGS) $(SUNDIALS_LIBS) $(LIBS) $(BLAS_LAPACK_LIBS) ; \
done
@if test "X${LAPACK_ENABLED}" = "Xyes"; then \
for i in ${EXAMPLES_BL} ; do \
$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(SUNDIALS_INCS) $(CFLAGS) -c $(srcdir)/$${i}.c -o $${i}${OBJ_EXT} ; \
$(LIBTOOL) --mode=link $(CC) -o $(builddir)/$${i}$(EXE_EXT) $(builddir)/$${i}${OBJ_EXT} $(CFLAGS) $(LDFLAGS) $(SUNDIALS_LIBS) $(LIBS) $(BLAS_LAPACK_LIBS) ; \
done ; \
fi
install:
$(mkinstalldirs) $(EXS_INSTDIR)/cvodes/serial
$(INSTALL_FILE) Makefile_ex $(EXS_INSTDIR)/cvodes/serial/Makefile
$(INSTALL_FILE) $(top_srcdir)/examples/cvodes/serial/README $(EXS_INSTDIR)/cvodes/serial/
for i in ${EXAMPLES} ; do \
$(INSTALL_FILE) $(top_srcdir)/examples/cvodes/serial/$${i}.c $(EXS_INSTDIR)/cvodes/serial/ ; \
$(INSTALL_FILE) $(top_srcdir)/examples/cvodes/serial/$${i}.out $(EXS_INSTDIR)/cvodes/serial/ ; \
done
@if test "X${LAPACK_ENABLED}" = "Xyes"; then \
for i in ${EXAMPLES_BL} ; do \
$(INSTALL_FILE) $(top_srcdir)/examples/cvodes/serial/$${i}.c $(EXS_INSTDIR)/cvodes/serial/ ; \
$(INSTALL_FILE) $(top_srcdir)/examples/cvodes/serial/$${i}.out $(EXS_INSTDIR)/cvodes/serial/ ; \
done ; \
fi
uninstall:
rm -f $(EXS_INSTDIR)/cvodes/serial/Makefile
rm -f $(EXS_INSTDIR)/cvodes/serial/README
for i in ${EXAMPLES} ; do \
rm -f $(EXS_INSTDIR)/cvodes/serial/$${i}.c ; \
rm -f $(EXS_INSTDIR)/cvodes/serial/$${i}.out ; \
done
@if test "X${LAPACK_ENABLED}" = "Xyes"; then \
for i in ${EXAMPLES_BL} ; do \
rm -f $(EXS_INSTDIR)/cvodes/serial/$${i}.c ; \
rm -f $(EXS_INSTDIR)/cvodes/serial/$${i}.out ; \
done ; \
fi
$(rminstalldirs) $(EXS_INSTDIR)/cvodes/serial
$(rminstalldirs) $(EXS_INSTDIR)/cvodes
clean:
rm -rf .libs
rm -f *.lo
rm -f ${OBJECTS} ${OBJECTS_BL}
rm -f $(EXECS) $(EXECS_BL)
distclean: clean
rm -f Makefile
rm -f Makefile_ex
# ----------------------------------------------------------------------------------------------------------------------
libtool: $(top_builddir)/$(LIBTOOL_DEPS)
@cd ${top_builddir} ; \
${SHELL} ./config.status --recheck ; \
cd ${abs_builddir}
|