# $Id: rules,v 1.58 2001/08/22 17:57:34 balay Exp $ 

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

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

libmember:    ${LIBNAME}(${LIBMEMBER})

##############
SLSUFFIX = sl

shared_arch: shared_hpux

include ${PETSC_DIR}/bmake/common/rules.fortran.cpp
include ${PETSC_DIR}/bmake/common/rules.shared.basic

#
#  Generates a shared library from any .a library; not just the PETSc ones
#  This is to allow any user to generate his or her own shared library
#
oshared: 
	-@${RM} -rf tmp; \
	mkdir tmp; \
	cd tmp; \
        echo "building ${LIBNAME}.${SLSUFFIX}"; \
	${AR} x ../${LIBNAME}.a ;\
	${LD} -b  *.o  -o ../${LIBNAME}.${SLSUFFIX} ;\
	cd ../ ; \
	${RM} -rf tmp

#
# Notes:
#
#  The name of the C compiler to use, the -Aa option is mandatory
#  and indicates the we are compiling with ANSI C.
#
# For HPUX 9.* use the following instead
# C_SYS_LIB  =  -lV3 -lU77 
#
# On some HP 10.20 Machines use
# C_SYS_LIB  =  -lV3 -lU77 
#
# Alternative C_SYS_LIB which worked for some users
#
# C_SYS_LIB = -L/opt/fortran90/lib/pa2.0 -L/opt/fortran90/lib \
# -L/opt/langtools/lib -lF90 -lcl -lc -lisamstub
#
# Use this if using f77 instead of f90 compiler
# C_SYS_LIB		=  -lf -L/opt/fortran/lib  -lU77
#