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

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

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

shared_arch: shared_freebsd

#
#  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} -Bshareable --whole-archive -o ${LIBNAME}.${SLSUFFIX} ${LIBNAME}.a  > /dev/null 2>&1;

#
# Notes:
#
# With older version of ld can be replaced by '-Bforcearchive'
#
# We use the f77 f2c that comes with freebsd, the -Nn1000 is required for
# large Fortran files, you can increase the 1000 if need be.
#
# Older versions of freebsd may require the use of gnumake
# If you encounter problems with freebsd-make please send
# the output of make to petsc-maint@mcs.anl.gov
# 
#OMAKE    = gmake  --no-print-directory



