home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / lsof / Makefile < prev   
Encoding:
Makefile  |  1991-12-01  |  3.0 KB  |  146 lines

  1. #    $Id: Makefile,v 1.1 91/11/22 09:21:07 abe Exp $
  2. #
  3. #    Makefile for lsof(8L)
  4. #
  5. #    Victor A. Abell <abe@mace.cc.purdue.edu>
  6. #    Purdue University Computing Center (PUCC)
  7.  
  8. # Note: the following cpp (or equivalent) definitions are assumed.
  9. #
  10. #       AIX 3.1.[357]           -D_IBMR2
  11. #       HP-UX 7.x               -Dhpux
  12. #       HP-UX 8.x               -Dhpux
  13. #       Purdue DYNIX 3.0.12     -DDYNIX
  14. #       Sequent DYNIX 3.0.12    -DDYNIX
  15. #       NeXTStep 2.1            -DNeXT
  16. #       SunOS 4.1.1             -Dsun
  17. #
  18. # See SYSDEFS for other, specific definitions that may be required.
  19. #
  20. # Hint: see if there is a specific Makefile.<system> rule that is
  21. #       suitable for your installation -- e. g., Makefile.hpux7 or
  22. #       Makefile.sun.
  23.  
  24. # Some make(1)'s need to be told explicitly what shell to use.
  25.  
  26. SHELL= /bin/sh
  27.  
  28. # Define system-specific values in SYSDEFS.
  29. #
  30. #    System            Needs
  31. #       HP-UX 7.x               SYSDEFS= -DHPUX7
  32. #       HP-UX 8.x               SYSDEFS= -DHPUX8
  33. #       Sequent DYNIX 3.0.12    SYSDEFS= -DSEQUENT
  34.  
  35. SYSDEFS=
  36.  
  37. BIN= ${DESTDIR}/usr/local/etc
  38. DOC= ${DESTDIR}/usr/man
  39. GRP= kmem
  40.  
  41. DEBUG= -O
  42.  
  43. # If your HP-UX hp9000s800 system does not have the <sys/fss.h> header
  44. # file, add ``-I.'' to CDEFS -- e. g.,
  45. #
  46. # CDEFS= -I.
  47.  
  48. CDEFS=
  49.  
  50. CFLAGS= ${DEBUG} ${CDEFS} ${SYSDEFS}
  51.  
  52. # Define a special loader library.
  53. #
  54. #     System            Needs
  55. #    HPUX7            LDLIB= -lBSD
  56. #    SunOS            LDLIB= -lkvm
  57.  
  58. LDLIB=
  59.  
  60. HDR=
  61. SRC= lsof.c
  62. DEP= ${SRC}
  63. MAN= lsof.8
  64. OBJ= lsof.o
  65. SOURCE= Makefile ${HDR} ${SRC}
  66.  
  67. all: lsof
  68.  
  69. clean: FRC
  70.     rm -f Makefile.* lsof *.o a.out core errs tags
  71.  
  72. # The depend rule assumes the availability of PUCC's dependency generator.
  73.  
  74. depend: ${SRC} ${HDR} FRC
  75.     maketd ${CDEFS} ${DEP}
  76.  
  77. install: lsof FRC
  78.     install -c -s -m 2755 -g ${GRP} lsof ${BIN}
  79.  
  80. lint: ${SRC} ${HDR} FRC
  81.     lint ${CDEFS} ${DEP}
  82.  
  83. lsof: ${OBJ}
  84.     ${CC} -o $@ ${CFLAGS} ${OBJ} ${LDLIB}
  85.  
  86. # Generate Makefile for IBM RISC/System 6000.
  87.  
  88. Makefile.ibmr2: Makefile
  89.     sed -e 's@^GRP= kmem@GRP= system@' <Makefile >$@
  90.  
  91. # Generate Makefile for HP-UX 7.x.
  92.  
  93. Makefile.hpux7: Makefile
  94.     sed -e 's@^LDLIB=@LDLIB= -lBSD@' -e 's@^SYSDEFS=@SYSDEFS= -DHPUX7@' <Makefile >$@
  95.  
  96. # Generate Makefile for HP-UX 8.x.
  97.  
  98. Makefile.hpux8: Makefile
  99.     sed -e 's@^SYSDEFS=@SYSDEFS= -DHPUX8@' <Makefile >$@
  100.  
  101. # Generate Makefile for NeXTStep 2.[01].
  102.  
  103. Makefile.next2: Makefile
  104.     sed -e 's@^GRP= kmem@GRP= operator@' <Makefile >$@
  105.  
  106. # Generate Makefile for Sequent's version of DYNIX.
  107.  
  108. Makefile.sequent: Makefile
  109.     sed -e 's@^SYSDEFS=@SYSDEFS= -DSEQUENT@' <Makefile >$@
  110.  
  111. # Generate Makefile for SunOS 4.1.1.
  112.  
  113. Makefile.sun: Makefile
  114.     sed -e 's@^LDLIB=@LDLIB= -lkvm@' <Makefile >$@
  115.  
  116. # The mkcat rule assumes the availability of PUCC's manual page handler.
  117.  
  118. mkcat: ${MAN} ${DOC} FRC
  119.     mkcat -r${DOC} ${MAN}
  120.  
  121. print: source FRC
  122.     lpr -J'lsof source' ${SOURCE}
  123.  
  124. source: ${SOURCE} FRC
  125.  
  126. # The following rule assumes the use of RCS.
  127.  
  128. spotless: clean
  129.     rcsclean ${SOURCE}
  130.  
  131. tags: ${SRC} ${HDR} FRC
  132.     ctags -t ${SRC} ${HDR}
  133.  
  134. # The following rule assumes the use of RCS.
  135.  
  136. ${SOURCE}:
  137.     co -q $@
  138.  
  139. FRC:
  140.  
  141. # DO NOT DELETE THIS LINE - maketd DEPENDS ON IT
  142.  
  143. lsof.o: lsof.c
  144.  
  145. # *** Do not add anything here - It will go away. ***
  146.