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

  1. #!/bin/sh
  2.  
  3. # Make a FreeBSD shared library
  4. # contributed by Mark Diekhans <markd@grizzly.com>
  5.  
  6. # First argument is name of output library
  7. # Rest of arguments are object files
  8.  
  9. VERSION="12.8"
  10.  
  11. LIBRARY=$1
  12. shift 1
  13. OBJECTS=$*
  14.  
  15. BASENAME=`echo ${LIBRARY} | sed "s/\.a//g"`
  16. SHLIB=${BASENAME}.so.${VERSION}
  17. STLIB=${BASENAME}.a
  18.  
  19. rm -f ${SHLIB} ${STLIB}
  20.  
  21. ar cq ${STLIB} ${OBJECTS}
  22. ranlib ${STLIB}
  23. ld -Bshareable -o ${SHLIB} ${OBJECTS}
  24.  
  25. mv ${SHLIB} ../lib
  26.