home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / rna / makefile < prev    next >
Makefile  |  1989-06-27  |  3KB  |  112 lines

  1. # australian readnews makefile
  2. # =()<NEWSARTS = @<NEWSARTS>@>()=
  3. NEWSARTS = /usr/spool/news
  4. # =()<NEWSBIN = @<NEWSBIN>@>()=
  5. NEWSBIN = /usr/lib/newsbin
  6. # =()<NEWSCTL = @<NEWSCTL>@>()=
  7. NEWSCTL = /usr/lib/news
  8. # workaround for System V make bug
  9. SHELL = /bin/sh
  10.  
  11. DEFINES=
  12. COPTS=-O
  13. CFLAGS=$(COPTS) $(DEFINES)
  14. INSTALL=:# install bigpdp
  15. NFLAG =
  16. LINT = lint -ha $(DEFINES)
  17. I=/usr/include
  18. C=/lib/libc.a
  19. LIBS=lib/lib.a ../libcnews.a
  20. BIN=/bin
  21. BINDIR=$(BIN)
  22.  
  23. COMMANDS = postnews uurec readnews uusend expire postgroup
  24. FILES = help
  25. LCOMMANDS = postnews.lint uurec.lint readnews.lint uusend.lint expire.lint
  26. PFILES = header.c postnews.c funcs.c active.c history.c maketime.c mtempnam.c
  27. RFILES = header.c readnews.c funcs.c active.c newsrc.c history.c maketime.c
  28. ROFILES= header.o readnews.o funcs.o active.o newsrc.o history.o maketime.o
  29. EFILES = expire.c funcs.c active.c
  30.  
  31. .c.lint:
  32.     $(LINT) $< > $@
  33.  
  34. .c:
  35.     $(CC) $(CFLAGS) $*.c $(NFLAG) -o $(@F)
  36.     $(INSTALL) $* bin 711 $@
  37.  
  38. .sh:
  39.     $(INSTALL) -c $*.sh bin 755 $@
  40.  
  41. all: readnews checknews
  42.     : warning, defs.h may not be right for your system
  43.  
  44. readnews: $(ROFILES) defs.h $(LIBS)
  45.     $(CC) $(CFLAGS) $(ROFILES) $(LIBS) -o $@
  46.  
  47. newsinstall:
  48.     : "install all control files; don't overwrite any!"
  49.     -if test ! -r $(NEWSCTL)/news.help; then cp news.help $(NEWSCTL); fi
  50.  
  51. # bininstall: make directories, install programs
  52. bininstall: install
  53. install: $(BINDIR)/readnews $(BINDIR)/checknews
  54. $(BINDIR)/readnews: readnews
  55.     cp readnews $(BINDIR)
  56.     : "$(INSTALL) - readnews bin 711 $(BINDIR)/readnews $(BINDIR)/news"
  57. $(BINDIR)/checknews:    checknews
  58.     chmod +x checknews
  59.     cp checknews $(BINDIR)
  60.  
  61. defs.h:    at.h # $C
  62.     touch defs.h
  63.  
  64. lint: $(LCOMMANDS)
  65.  
  66. help: $(NEWSCTL)/help
  67. $(NEWSCTL)/help: news.help
  68.     $(INSTALL) -c news.help news 644 $(NEWSCTL)/help
  69.  
  70. lib/lib.a:
  71.     : if you do not have ranlib, you will need to edit lib/makefile
  72.     (cd lib; make)
  73.  
  74. $(ROFILES): defs.h
  75.  
  76. postnews: $(BINDIR)/postnews
  77. $(BINDIR)/postnews: $(PFILES) defs.h
  78.     $(CC) $(CFLAGS) $(PFILES) -o postnews
  79.     $(INSTALL) - postnews news 6711 $(BINDIR)/postnews
  80.  
  81. postgroup: $(BINDIR)/postgroup
  82. $(BINDIR)/postgroup: postgroup.sh
  83.  
  84. uurec: $(NEWSCTL)/uurec
  85. $(NEWSCTL)/uurec: uurec.c defs.h
  86.  
  87. uusend: $(NEWSCTL)/uusend
  88. $(NEWSCTL)/uusend: defs.h uusend.c
  89.  
  90. expire: $(NEWSCTL)/expire
  91. $(NEWSCTL)/expire: $(EFILES) defs.h
  92.     $(CC) $(CFLAGS) $(EFILES) $(NFLAG) -o expire
  93.     $(INSTALL) expire news 700 $(NEWSCTL)/expire
  94.  
  95. postnews.lint: $(PFILES)
  96.     $(LINT) $(PFILES) > postnews.lint
  97.  
  98. readnews.lint: $(RFILES)
  99.     $(LINT) $(RFILES) > readnews.lint
  100.  
  101. expire.lint: $(EFILES)
  102.     $(LINT) $(EFILES) > expire.lint
  103.  
  104. uurec.lint: uurec.c defs.h
  105. uusend.lint: uusend.c defs.h
  106.  
  107. .FINISH:
  108.     rm -s *.o
  109. clean:
  110.     rm -f *.o core a.out readnews
  111.     (cd lib ; make clean)
  112.