# $Id: base,v 1.18 1998/04/26 01:00:56 balay Exp $ 

#
#   The PARCH flag below is the same for the Cray T3D and T3E, so DO NOT change
#  the t3d below to t3e.
#
PARCH    = t3d
CC       = cc
#
#  Indicates the version of the compiler you are using; if you do not know
#  how to get the version number then use: unknown
#
CCV      = ${CC} -V
#
FC       = f90 -dp
AR       = ar
RM       = rm -f
RANLIB   = true
OMAKE    = make
SHELL    = /bin/sh
CLINKER  = ${CC} ${COPTFLAGS}
FLINKER  = ${FC} ${FOPTFLAGS} -M7207
SYS_LIB  =
SHELL   = /bin/sh

include ${PETSC_DIR}/bmake/common

libc:
	for i in ${OBJSC}; do ${OMAKE} BOPT=${BOPT} libmember LIBMEMBER=$$i ; done

libf:
	for i in ${OBJSF}; do ${OMAKE} BOPT=${BOPT} libmember LIBMEMBER=$$i ; done

libmember:    ${LIBNAME}(${LIBMEMBER})
	@-true

#########
#
# C - debug directives start as '#line LINE_NO' where as fortran directives
# are '# LINE_NUMBER'. sed is used to convert from c-directives to fortran
#
# 'f90 __x.f -o x.o' does not work on T3E. Hence x.f is used instead of __x.f.
# To avoid the clash between x.F and x.f, x.f is placed in /tmp
#

.F.f:
	-${RM} /tmp/$*.f
	-${CC} -E ${CPPFLAGS} $*.F | sed -e 's/^#line/#/g'  > /tmp/$*.f
.F.o:
	-${RM} /tmp/$*.f
	-${CC} -E ${CPPFLAGS} $*.F | sed -e 's/^#line/#/g'  > /tmp/$*.f
	-${FC} -c ${FOPTFLAGS} ${FFLAGS} /tmp/$*.f
	-${RM} /tmp/$*.f

.F.a:
	-${RM} /tmp/$*.f
	-${CC} -E ${CPPFLAGS} $*.F | sed -e 's/^#line/#/g'  > /tmp/$*.f
	-${FC} -c ${FOPTFLAGS} ${FFLAGS} /tmp/$*.f
	-${AR} cr ${LIBNAME} $*.o
	-${RM} /tmp/$*.f

shared:
