home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / mklib.netbsd < prev    next >
Text File  |  1996-05-27  |  525b  |  28 lines

  1. #!/bin/sh
  2.  
  3. # Make a NetBSD shared library
  4. # contributed by Michael Graff (explorer@flame.org)
  5.  
  6. # First argument is name of output library
  7. # Rest of arguments are object files
  8.  
  9. set -x
  10.  
  11. LIBRARY=`basename $1 .so`
  12.  
  13. shift 1
  14. OBJECTS=$*
  15.  
  16. VERSION="1.2.8"
  17.  
  18. echo "Building PIC library $LIBRARY"
  19. rm -f ${LIBRARY}_pic.a ${LIBRARY}.so.${VERSION}
  20. ar cq ${LIBRARY}_pic.a ${OBJECTS}
  21. ranlib ${LIBRARY}_pic.a
  22.  
  23. ld -x -Bshareable -Bforcearchive -o ${LIBRARY}.so.${VERSION} ${LIBRARY}_pic.a
  24.  
  25. cp ${LIBRARY}_pic.a ${LIBRARY}.so.${VERSION} ../lib
  26.  
  27.  
  28.