home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1625 / Makefile < prev    next >
Encoding:
Makefile  |  1990-12-28  |  2.4 KB  |  68 lines

  1. # Makefile for saywha
  2. #
  3. # Copyright (C) 1990 by Jef Poskanzer.
  4. #
  5. # Permission to use, copy, modify, and distribute this software and its
  6. # documentation for any purpose and without fee is hereby granted, provided
  7. # that the above copyright notice appear in all copies and that both that
  8. # copyright notice and this permission notice appear in supporting
  9. # documentation.  This software is provided "as is" without express or
  10. # implied warranty.
  11.  
  12. # CONFIGURE: Define this if you want to enable the mail_editor option.
  13. # If you don't know what mail_editor is, don't worry about it.
  14. #ME_DEF =    -DMAIL_EDITOR=\"/usr/local/bin/mail_editor\"
  15.  
  16. # CONFIGURE: As far as I know, all implementations of NFS choke on
  17. # write-only files.  Normally, say and wha use write-only files to record
  18. # the messages, but if your home directories are NFS-ized, this won't work.
  19. # In this case you have two options.  One, set the WORLD_READABLE flag
  20. # below; this will make your .sayfiles world-readable, which is undesireable,
  21. # but it works.  Two, don't set WORLD_READABLE flag, but after installation
  22. # manually make the say and wha executables set-group-id to tty, and
  23. # manually chgrp everyone's .sayfiles to tty, and keep on doing this
  24. # every time someone new starts using say/wha.  Neither alternative is
  25. # very nice, but that's life.  If you can think of a better solution,
  26. # please let me know.
  27. #NFS_DEF =
  28. NFS_DEF =    -DWORLD_READABLE
  29.  
  30. # CONFIGURE: Change these if you want to use something besides write(1).
  31. WR_DEF =    -DWRITE=\"write\"
  32. WR_HD_DEF =    -DWRITE_HEAD=\"Message\ from\ %s@%s\ on\ %s\ at\ %s\ ...\\n\"
  33. WR_TL_DEF =    -DWRITE_TAIL=\"EOF\\n\"
  34.  
  35. DEFINES =    $(ME_DEF) $(NFS_DEF) $(WR_DEF) $(WR_HD_DEF) $(WR_TL_DEF)
  36.  
  37. # CONFIGURE: Set compiler flags here if you like.
  38. CFLAGS =    -O $(DEFINES)
  39. # CFLAGS =    -g $(DEFINES)
  40.  
  41. # CONFIGURE: Set linker flags here if you like.
  42. LDFLAGS =    -s
  43. # LDFLAGS =
  44.  
  45. LFLAGS =    -hxz $(DEFINES)
  46.  
  47. all:        say wha
  48.  
  49. say:        say.c libsaywha.h libsaywha.o
  50.     cc $(CFLAGS) say.c libsaywha.o $(LDFLAGS) -o say
  51.  
  52. wha:        wha.c libsaywha.h libsaywha.o
  53.     cc $(CFLAGS) wha.c libsaywha.o $(LDFLAGS) -o wha
  54.  
  55. libsaywha.o:    libsaywha.c libsaywha.h
  56.     cc $(CFLAGS) -c libsaywha.c
  57.  
  58. lint:
  59.     lint $(LFLAGS) say.c libsaywha.c
  60.     lint $(LFLAGS) wha.c libsaywha.c
  61.  
  62. clean:
  63.     -rm -f *.o core say wha *.shar
  64.  
  65. shar:        saywha.shar
  66. saywha.shar:    README Makefile say.c say.1 wha.c wha.1 libsaywha.c libsaywha.h
  67.     shar -v -c -p X README Makefile say.c say.1 wha.c wha.1 libsaywha.c libsaywha.h > $@
  68.