# $Id: rules,v 1.26 2001/08/22 17:58:22 balay Exp $ 

libc: ${LIBNAME}(${OBJSC})
libf: ${LIBNAME}(${OBJSF})


#############
shared_arch: shared_solaris

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} -G  -h ${LIBNAME}.${SLSUFFIX} *.o  -o ../${LIBNAME}.${SLSUFFIX} ; \
	cd ../ ; \
	${RM} -rf tmp
