home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2032 / Makefile < prev    next >
Makefile  |  1990-12-28  |  3KB  |  103 lines

  1. # The Cnews Extensions Package - Brendan Kehoe - brendan@cs.widener.edu
  2. # (can currently be reached at kehoe@scotty.dccs.upenn.edu)
  3. # Last Updated: 11/04/90
  4. #
  5. # Step 1 - Edit anne.h, spacefor.h, and rnews.h to customize them for
  6. #       your site. Also see rnews.readme for important information for
  7. #       rnews to work properly.
  8. # Step 2 - If your machine needs the TZ environmental variable, edit the
  9. #       line in rnews.c that reads 'environ[2] = "TZ=EST5EDT"' to use
  10. #       your local timezone
  11. # Step 3 - Set up BINDIR, RNEWSDIR, CC, and CFLAGS for your configuration.
  12. # Step 4 - Do a make.
  13. # Step 5 - Do a 'make install' -- this will replace the current versions
  14. #       of spacefor, tear, and anne.jones with the new ones.
  15. #[Step 6]- If you want to go back to what you had before, do 'make undo'..
  16. #       it'll put the old versions back. (They're in $BINDIR/old)
  17. #
  18. # This is your NEWSBIN directory (if it's a sym link, that's ok)
  19. BINDIR    = /usr/lib/newsbin
  20. #
  21. # This is the directory where the rnews program currently resides
  22. RNEWSDIR= /usr/local/bin
  23. #
  24. # CC:
  25. # If you don't have Gnu C, have 'cc' uncommented instead.
  26. CC    = cc
  27. #CC    = gcc
  28. #
  29. # CFLAGS:
  30. # If you have Gnu C, work with the first line (with the -f's in it);
  31. #  otherwise, use the second. 
  32. # If you're a BSD system, use -DBSD
  33. # If you're running AIX 2.2.1 on an IBM RT use -DAIX
  34. # If you're on a USG system, use -DUSG    (note only rnews uses this)
  35. # Note for SunOS 4.1: I expressly didn't use -O2 or higher because of
  36. #  the many bugreports that are logged discounting their accuracy. (Most
  37. #  notable is -O2, generally accepted, even in the Gnu Project.)
  38. #
  39. #CFLAGS       = -O -traditional -finline-functions -fstrength-reduce -DBSD
  40. CFLAGS        = -O -DBSD
  41. #
  42. # And that's all she wrote.
  43.   
  44. all: anne.stub tear spacefor.stub rnews
  45.  
  46. anne.stub: getline.o anne.misc.o anne.h anne.jones.c
  47.     $(CC) $(CFLAGS) anne.jones.c -o anne.stub getline.o anne.misc.o $(LDFLAGS)
  48.     strip $@
  49.  
  50. tear: getline.c tear.c
  51.     $(CC) $(CFLAGS) $@.c -o $@ getline.o $(LDFLAGS)
  52.     strip $@
  53.  
  54. spacefor.stub: spacefor.c
  55.     $(CC) $(CFLAGS) spacefor.c -o spacefor.stub $(LDFLAGS)
  56.     strip $@
  57.  
  58. rnews: rnews.c
  59.     $(CC) $(CFLAGS) $@.c -o $@ $(LDFLAGS)
  60.     strip $@
  61.  
  62. install:
  63.     -mkdir $(BINDIR)/old
  64.     mv $(BINDIR)/spacefor $(BINDIR)/old
  65.     cp spacefor.sh $(BINDIR)/spacefor
  66.     cp spacefor.stub $(BINDIR)
  67.     -mkdir $(BINDIR)/inject/old
  68.     mv $(BINDIR)/inject/anne.jones $(BINDIR)/inject/old
  69.     mv $(BINDIR)/inject/tear $(BINDIR)/inject/old
  70.     cp anne.jones.sh $(BINDIR)/inject/anne.jones
  71.     cp anne.stub $(BINDIR)/inject
  72.     cp tear $(BINDIR)/inject
  73.     -mkdir $(RNEWSDIR)/old
  74.     mv $(RNEWSDIR)/rnews $(RNEWSDIR)/old
  75.     cp rnews $(RNEWSDIR)
  76.  
  77. installaj:
  78.     -mkdir $(BINDIR)/old
  79.     mv $(BINDIR)/inject/anne.jones $(BINDIR)/inject/old
  80.     cp anne.jones.sh $(BINDIR)/inject/anne.jones
  81.     cp anne.stub $(BINDIR)/inject
  82.  
  83. installnews:
  84.     mkdir $(RNEWSDIR)/old
  85.     mv $(RNEWSDIR)/rnews $(RNEWSDIR)/old
  86.     cp rnews $(RNEWSDIR)
  87.  
  88. undo:
  89.     rm -f $(BINDIR)/spacefor.stub $(BINDIR)/inject/anne.stub
  90.     -mv $(BINDIR)/old/* $(BINDIR)/
  91.     -mv $(BINDIR)/inject/old/* $(BINDIR)/inject
  92.     -rmdir $(BINDIR)/old $(BINDIR)/inject/old
  93.     -mv $(RNEWSDIR)/old/rnews $(RNEWSDIR)/
  94.     -rmdir $(RNEWSDIR)/old
  95.  
  96. shar:
  97.     shar -i list -o cnews.set.shar
  98.  
  99. clean:
  100.     rm -f anne.stub tear spacefor.stub rnews getline.o anne.misc.o tear.o
  101.     rm -f core a.out spacefor.o anne.jones.o *.ln gmon.out cnews.set.shar
  102.  
  103.