# $Id: rules,v 1.71 2001/08/22 17:58:22 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})

#############
shared_arch: shared_solaris
#
#  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
#
#  The ${C_SYS_LIB} -lC is too tell the linker the location of the libC.a 
#  library and force it to include those symbols into the shared library.
#  Since there is no .so version of the libC.a it must be done this way.

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

oshared: 
	-@echo "building ${LIBNAME}.${SLSUFFIX} with ${NEEDED_A_LIBS} ${C_SYS_LIB} "
	-@${RM} -rf *.o
	-@${AR} x ${LIBNAME}.a 
	-@${LD} -G  -h ${LIBNAME}.${SLSUFFIX} *.o  -o ${LIBNAME}.${SLSUFFIX} ${NEEDED_A_LIBS} ${C_SYS_LIB} 
	-@${RM} -rf *.o

