home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 26.ddi / root.3 / usr / ucb / ld < prev    next >
Encoding:
Text File  |  1990-12-20  |  1.6 KB  |  54 lines

  1. #!/sbin/sh
  2. #    Copyright (c) 1990 UNIX System Laboratories, Inc.
  3. #    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
  4. #      All Rights Reserved
  5.  
  6. #    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
  7. #    UNIX System Laboratories, Inc.
  8. #    The copyright notice above does not evidence any
  9. #    actual or intended publication of such source code.
  10.  
  11. #ident    "@(#)//usr/ucb/ld.sl 1.1 4.0 12/08/90 57693 AT&T-USL"
  12. #    Portions Copyright(c) 1988, Sun Microsystems, Inc.
  13. #    All Rights Reserved
  14.  
  15. # ld command for BSD compatibility package:
  16. #
  17. #       BSD compatibility package libraries (/usr/ucblib) are
  18. #       searched next to third to last.  SVr4 default libraries 
  19. #       (/usr/ccs/lib and /usr/lib) are searched next to last and
  20. #    last respectively.
  21. #
  22. #       Because the BSD compatibility package C library does not 
  23. #       contain all the C library routines of /usr/ccs/lib/libc.a, 
  24. #       the BSD package C library is named /usr/ucblib/libucb.a
  25. #       and is passed explicitly to ld.  This ensures that libucb.a 
  26. #       will be searched first for routines and that 
  27. #       /usr/ccs/lib/libc.a will be searched afterwards for routines 
  28. #       not found in /usr/ucblib/libucb.a.  Also because sockets is    
  29. #       provided in libc under BSD, /usr/lib/libsocket and /usr/lib/nsl
  30. #       are also included as default libraries.
  31. #
  32. #       NOTE: the -Y L, and -Y U, options of ld are not valid 
  33.  
  34. opts=
  35. LIBS="-lucb -l socket -lnsl"
  36.  
  37. if [ $# -gt 0 ]
  38. then
  39.     for i in $*
  40.     do
  41.         case $i in
  42.             -r)
  43.                 LIBS=""
  44.                 opts="$opts $i"
  45.                 shift;;
  46.             *)
  47.                 opts="$opts $i"
  48.                 shift;;
  49.         esac
  50.     done
  51. fi
  52.  
  53. /usr/ccs/bin/ld -YP,:/usr/ucblib:/usr/ccs/lib:/usr/lib $LIBS $opts 
  54.