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

  1. # $Header: /usr/jjc/lprps/RCS/Makefile,v 1.3 90/12/18 10:07:22 jjc Rel $
  2. # Define A4 if you use A4 rather than letter size paper.
  3. DEFINES=-DA4
  4. # Where to install public executables.
  5. BINDIR=/usr/local/bin
  6. # Where to install private executables.
  7. LIBDIR=/usr/local/lib
  8. # Define REV_COMMAND to be empty if documents don't need to
  9. # be printed in reverse order.
  10. REV_COMMAND=$(BINDIR)/psrev |
  11. # Where to install the filter for text files.
  12. TEXT_FILTER=$(LIBDIR)/psif-text
  13. # Where to install the filter for PostScript files.
  14. PS_FILTER=$(LIBDIR)/psif-ps
  15. # Filter to convert text to PostScript.  You can use your own instead.
  16. # It must be able to read from standard input.
  17. TEXT_TO_PS=$(BINDIR)/textps
  18. CC=cc
  19. CFLAGS=-g -Bstatic $(DEFINES)
  20. INSTALL=install
  21.  
  22. SOURCES=README INSTALL Makefile psrev.c lprps.c psif.c textps.c
  23.  
  24. all: psrev psif lprps textps psif-text psif-ps
  25.  
  26. install: all
  27.     $(INSTALL) psif lprps $(LIBDIR)
  28.     $(INSTALL) textps psrev $(BINDIR)
  29.     $(INSTALL) psif-text $(TEXT_FILTER)
  30.     $(INSTALL) psif-ps $(PS_FILTER)
  31.     @echo Now edit /etc/printcap
  32.  
  33. lprps: lprps.c
  34.     $(CC) $(CFLAGS) -o $@ $<
  35.  
  36. psif: psif.c
  37.     $(CC) $(CFLAGS) -DTEXT_FILTER=\"$(TEXT_FILTER)\" \
  38.     -DPS_FILTER=\"$(PS_FILTER)\" -o $@ $<
  39.  
  40. textps: textps.c
  41.     $(CC) $(CFLAGS) -o $@ $<
  42.  
  43. psrev: psrev.c
  44.     $(CC) $(CFLAGS) -o $@ $<
  45.  
  46. psif-text: Makefile
  47.     @echo Creating $@
  48.     @echo "#! /bin/sh" > $@
  49.     @echo "$(TEXT_TO_PS) | $(REV_COMMAND) $(LIBDIR)/lprps \$$*" >>$@
  50.     @chmod +x $@
  51.  
  52. psif-ps: Makefile
  53.     @echo Creating $@
  54.     @echo "#! /bin/sh" > $@
  55.     @echo "$(REV_COMMAND) $(LIBDIR)/lprps \$$*" >>$@
  56.     @chmod +x $@
  57.  
  58. lprps.shar: $(SOURCES)
  59.     shar $(SOURCES) >$@
  60.  
  61. clean:
  62.     rm -f psrev psif lprps textps psif-text psif-ps
  63.