#! /bin/csh 
#
# $Id: make_dso_IRIX,v 1.10 1997/09/10 18:07:55 balay Exp $ 
#
#
# This Utility converts the static ".a" library files to dynamic ".so" files
# invoked as make_dso_IRIX $(PETSC_LIBRARY_PATH)
#
echo  making dynamic libraries in $argv[1]
cd $argv[1]
foreach LIBNAME (mpiuni petsccontrib  petscksp petscmat \
  petscsles petscsnes petscsys petscts petscvec)
  if ( -e lib$LIBNAME.a) then 
     if ( -e lib$LIBNAME.so ) then
        find . -type f -name "lib$LIBNAME.a" -newer "lib$LIBNAME.so" -exec \
            ld -elf -no_library_replacement -shared -rdata_shared -all lib$LIBNAME.a -o lib$LIBNAME.so \;
     else
        ld -elf -no_library_replacement -shared -rdata_shared -all lib$LIBNAME.a -o lib$LIBNAME.so 
     endif
  endif
end

