home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3138 / Makefile < prev    next >
Makefile  |  1991-03-26  |  3KB  |  90 lines

  1. # The Cnews Extensions Package - Brendan Kehoe - brendan@cs.widener.edu
  2. #
  3. # This is available via anon FTP at 192.55.239.132 (ftp.cs.widener.edu)
  4. #
  5. # Last Updated: 03/26/91
  6. #
  7. # Step 1 - Edit anne.h, spacefor.h, and to customize them for your site.
  8. # Step 2 - Set up BINDIR, CC, CFLAGS, and CNEWSLIB for your configuration.
  9. # Step 3 - Do a make.
  10. # Step 4 - Do a 'make install' -- this will replace the current versions
  11. #       of spacefor, tear, and anne.jones with the new ones.
  12. #[Step 5]- If you want to go back to what you had before, do 'make undo'..
  13. #       it'll put the old versions back. (They're in $BINDIR/old)
  14. #
  15. # This is your NEWSBIN directory (if it's a sym link, that's ok)
  16. BINDIR    = /usr/lib/newsbin
  17. #
  18. # CC:
  19. # If you don't have Gnu C, have 'cc' uncommented instead.
  20. CC    = cc
  21. #CC    = gcc
  22. #
  23. # CFLAGS:
  24. # If you have Gnu C, work with the first line (with the -f's in it);
  25. #  otherwise, use the second. 
  26. # If you're a BSD system, use -DBSD
  27. # If you're running AIX 2.2.1 on an IBM RT use -DAIX
  28. # If you're on an Altos system, use -DALTOS (note only spacefor uses this)
  29. # Note for SunOS 4.1: I expressly didn't use -O2 or higher because of
  30. #  the many bugreports that are logged discounting their accuracy. (Most
  31. #  notable is -O2, generally accepted, even in the Gnu Project.)
  32. #
  33. #CFLAGS       = -O -traditional -finline-functions -fstrength-reduce -DBSD
  34. CFLAGS        = -O -DBSD
  35. #
  36. # Where your libcnews.a is .. yup, you have to have it. If you don't
  37. # have it, go back into conf and run doit.bin again, Ctrl-C'ing after
  38. # it's run ranlib (or ar rux) on it.
  39. #
  40. CNEWSLIB = /usr/local/work/cnews/libcnews.a # Make SURE you change THIS!
  41. #
  42. # And that's all she wrote. Change NOTHING else unless you know what
  43. # you're doing.
  44.   
  45. all: anne.stub tear spacefor.stub $(CNEWSLIB)
  46.  
  47. anne.stub: getline.o anne.misc.o anne.h anne.jones.c
  48.     $(CC) $(CFLAGS) anne.jones.c -o anne.stub getline.o anne.misc.o $(LDFLAGS) $(CNEWSLIB)
  49.     strip $@
  50.  
  51. tear: getline.o tear.c
  52.     $(CC) $(CFLAGS) $@.c -o $@ getline.o $(LDFLAGS)
  53.     strip $@
  54.  
  55. spacefor.stub: spacefor.c
  56.     $(CC) $(CFLAGS) spacefor.c -o spacefor.stub $(LDFLAGS)
  57.     strip $@
  58.  
  59. install:
  60.     -mkdir $(BINDIR)/old
  61.     mv $(BINDIR)/spacefor $(BINDIR)/old
  62.     cp spacefor.sh $(BINDIR)/spacefor
  63.     cp spacefor.stub $(BINDIR)
  64.     -mkdir $(BINDIR)/inject/old
  65.     mv $(BINDIR)/inject/anne.jones $(BINDIR)/inject/old
  66.     mv $(BINDIR)/inject/tear $(BINDIR)/inject/old
  67.     cp anne.jones.sh $(BINDIR)/inject/anne.jones
  68.     cp anne.stub $(BINDIR)/inject
  69.     cp tear $(BINDIR)/inject
  70.  
  71. installaj:
  72.     -mkdir $(BINDIR)/old
  73.     mv $(BINDIR)/inject/anne.jones $(BINDIR)/inject/old
  74.     cp anne.jones.sh $(BINDIR)/inject/anne.jones
  75.     cp anne.stub $(BINDIR)/inject
  76.  
  77. undo:
  78.     rm -f $(BINDIR)/spacefor.stub $(BINDIR)/inject/anne.stub
  79.     -mv $(BINDIR)/old/* $(BINDIR)/
  80.     -mv $(BINDIR)/inject/old/* $(BINDIR)/inject
  81.     -rmdir $(BINDIR)/old $(BINDIR)/inject/old
  82.  
  83. shar:
  84.     shar -i list -o cnews.set.shar
  85.  
  86. clean:
  87.     rm -f anne.stub tear spacefor.stub getline.o anne.misc.o tear.o
  88.     rm -f core a.out spacefor.o anne.jones.o *.ln gmon.out cnews.set.shar
  89.  
  90.