home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2778 / Makefile next >
Encoding:
Makefile  |  1991-02-18  |  1.1 KB  |  53 lines

  1. #    Makefile    1.1    6/9/85
  2. #
  3. DESTDIR=
  4. BINDIR=    /usr/new
  5. MANTYPE= n
  6.  
  7. CFLAGS=    -O
  8.  
  9. STD=    tac
  10. SCRIPT=    tmail
  11. MAN=    tac.1 tmail.1
  12.  
  13. all:    ${STD}
  14.  
  15. ${STD}:
  16.     cc ${CFLAGS} -o $@ $@.c
  17.  
  18. install: all
  19.     install -s tac ${DESTDIR}${BINDIR}/tac
  20.     install -m 755 -c tmail.sh ${DESTDIR}${BINDIR}/tmail
  21.     -for i in ${MAN}; do \
  22.         (install -m 644 -c $$i \
  23.         ${DESTDIR}/usr/man/man${MANTYPE}/`basename $$i .1`.${MANTYPE}); \
  24.         done
  25.  
  26. clean:
  27.     rm -f *.o ${STD} Makefile.bak makedep eddep a.out core errs 
  28.  
  29. depend:
  30.     rm -f makedep
  31.     for i in ${STD}; do \
  32.         (${CC} -M $$i.c |sed 's/.o: /: /' >>makedep); done
  33.     echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  34.     echo '$$r makedep' >>eddep
  35.     echo 'w' >>eddep
  36.     chmod u+w Makefile
  37.     cp Makefile Makefile.bak
  38.     ed - Makefile < eddep
  39.     rm -f eddep makedep
  40.     echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  41.     echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  42.     echo '# see make depend above' >> Makefile
  43.  
  44. # DO NOT DELETE THIS LINE -- make depend uses it
  45.  
  46. tac: tac.c
  47. tac: /usr/include/sys/types.h
  48. tac: /usr/include/sys/stat.h
  49. tac: /usr/include/stdio.h
  50. # DEPENDENCIES MUST END AT END OF FILE
  51. # IF YOU PUT STUFF HERE IT WILL GO AWAY
  52. # see make depend above
  53.