# $Id: rules,v 1.6 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})

############

shared: chkopts_basic
	-@echo making shared libraries in ${INSTALL_LIB_DIR} ;\
	cd ${INSTALL_LIB_DIR}; \
	for LIBNAME in ${SHLIBS} ; \
	do \
          if [ -f ${INSTALL_LIB_DIR}/$$LIBNAME.a ]; then \
	    flag=""; \
	    if [ -f ${INSTALL_LIB_DIR}/$$LIBNAME.${SLSUFFIX} ]; then \
              flag=`find ${INSTALL_LIB_DIR} -type f -name $$LIBNAME.a -newer ${INSTALL_LIB_DIR}/$$LIBNAME.${SLSUFFIX} -print`; \
	    else \
	      flag="true"; \
	    fi; \
	    if [ "$$flag" != "" ]; then \
	      echo "building $$LIBNAME.${SLSUFFIX}"; \
	      ${LD} -elf -no_library_replacement -shared -rdata_shared \
	            -all  $$LIBNAME.a  -o $$LIBNAME.${SLSUFFIX} ; \
	    fi; \
	  fi; \
	done
#
#  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: 
	-@echo "building $$LIBNAME.${SLSUFFIX}"
	-@${LD} -elf -no_library_replacement -shared -rdata_shared \
	            -all  ${LIBNAME}.a  -o ${LIBNAME}.${SLSUFFIX} ;
#
# Notes:
#
# This version of PETSCFLAGS specifies the use of Fortran kernels (via
# -DPETSC_USE_FORTRAN_KERNELS) for several low-level computational kernels for
# complex numbers rather than using the potentially slower C++ versions.
# To instead use the C++ routines, remove -DPETSC_USE_FORTRAN_KERNELS from this
# list.
