# $Id: makefile,v 1.16 1998/04/23 22:46:57 balay Exp $ 

CFLAGS          =  ${CPPFLAGS} -D__SDIR__='"${LOCDIR}"'
FFLAGS          = 
SOURCEC         = 
SOURCEF         =
SOURCEH         =
OBJSC           =
OBJSF           =
LIBBASE         = 
LOCDIR          = src/gvec/examples/tutorials/
TESTEXAMPLES_1  = ex1.PETSc runex1 ex1.rm ex2.PETSc runex2 ex2.rm ex3.PETSc runex3 ex3.rm \
                  ex4.PETSc runex4 ex4.rm
TESTEXAMPLES_2  =
TESTEXAMPLES_3  = 
TESTEXAMPLES_4  =
TESTEXAMPLES_5  = 
TESTEXAMPLES_6  = 
BUILDEXAMPLES_1 = 
BUILDEXAMPLES_2 =
BUILDEXAMPLES_3 = 
BUILDEXAMPLES_4 =

EXAMPLESC       = ex1.c ex2.c ex3.c ex4.c ex5.c common1and2.c common3and4.c common5and6.c \
                  ex6.c ex11.c
DIRS            = 

include ${PETSC_DIR}/bmake/${PETSC_ARCH}/base

ex1: ex1.o chkopts
	-${CLINKER} -o ex1 ex1.o ${GVEC_LIB}
	${RM} ex1.o

ex2: ex2.o chkopts
	-${CLINKER} -o ex2 ex2.o ${GVEC_LIB}
	${RM} ex2.o

ex3: ex3.o chkopts
	-${CLINKER} -o ex3 ex3.o ${GVEC_LIB}
	${RM} ex3.o

ex4: ex4.o chkopts
	-${CLINKER} -o ex4 ex4.o ${GVEC_LIB}
	${RM} ex4.o

ex5: ex5.o chkopts
	-${CLINKER} -o ex5 ex5.o ${GVEC_LIB}
	${RM} ex5.o

ex6: ex6.o chkopts
	-${CLINKER} -o ex6 ex6.o ${GVEC_LIB}
	${RM} ex6.o

ex11: ex11.o chkopts
	-${CLINKER} -o ex11 ex11.o ${GVEC_LIB}
	${RM} ex11.o

runex1:
	-@${MPIRUN} -np 1 ex1 -nox > ex1_1.tmp 2>&1;\
	   if (diff output/ex1_1.out ex1_1.tmp) then true; \
	   else echo "Possible problem with ex1_1, diffs above"; fi;\
	   ${RM} -f ex1_1.tmp
runex1_2:
	-@${MPIRUN} -np 3 ex1 -nox > ex1_2.tmp 2>&1;\
	   if (diff output/ex1_2.out ex1_2.tmp) then true; \
	   else echo "Possible problem with ex1_2, diffs above"; fi;\
	   ${RM} -f ex1_2.tmp

runex2:
	-@${MPIRUN} -np 1 ex2 -nox > ex2_1.tmp 2>&1;\
	   if (diff output/ex2_1.out ex2_1.tmp) then true; \
	   else echo "Possible problem with ex2_1, diffs above"; fi;\
	   ${RM} -f ex2_1.tmp
runex3:
	-@${MPIRUN} -np 1 ex3 -nox > ex3_1.tmp 2>&1;\
	   if (diff output/ex3_1.out ex3_1.tmp) then true; \
	   else echo "Possible problem with ex3_1, diffs above"; fi;\
	   ${RM} -f ex3_1.tmp
runex4:
	-@${MPIRUN} -np 1 ex4 -nox > ex4_1.tmp 2>&1;\
	   if (diff output/ex4_1.out ex4_1.tmp) then true; \
	   else echo "Possible problem with ex4_1, diffs above"; fi;\
	   ${RM} -f ex4_1.tmp
