home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3594 / Makefile < prev    next >
Encoding:
Makefile  |  1991-07-11  |  4.1 KB  |  144 lines

  1. # Makefile for XC
  2. # For XC, the following compiler switches are significant:
  3. #    -DDIDO=22
  4. #    -DDIDO=23
  5. #        For a Dial-In/Dial-Out port.
  6. #        22 is for SCO Xenix 2.2 which uses ungetty.
  7. #        23 is for SCO Xenix 2.3 whose getty is effectively a uugetty,
  8. #        for SCO Unix, or for other sites using uugetty.
  9. #
  10. #    -DT6000
  11. #        Causes the Tandy-6000 specific code modifications to be compiled.
  12. #
  13. #    -DDEBUG
  14. #        If this compiler switch is set, then whenever XC is run within a
  15. #        directory that contains a file called "debug.log", XC will append to
  16. #        that file a copy of all XC output, whether to the terminal "file" or
  17. #        to standard error. This can be useful for debugging scripts, coupled
  18. #        with the "debug" script command, which causes the lines of a script
  19. #        to be echoed to the terminal as they get executed. Since often such
  20. #        output passes up the terminal screen too quickly to read, the
  21. #        "debug.log" file provides a hard-copy of the XC session.
  22. #        No echoing to a "debug.log" file is done if XC is also     capturing
  23. #        incoming text to a capture file. If no "debug.log" file exists in the
  24. #        current directory, then no such echoing is done regardless of whether
  25. #        the -DDEBUG switch was set at compile time.
  26. #
  27. #    -DNOSHELL
  28. #        This will disallow shell escapes. Both the "!" and "$" mechanisms from
  29. #        the XC prompt, and the analogous SHELL and PIPE keywords in scripts,
  30. #        silently do nothing. However the standard output of backquoted shell
  31. #        commands can still be assigned to a script variable.
  32. #
  33.  
  34. SHELL = /bin/sh
  35.  
  36. # for debugging output
  37. DEBUG = -DDEBUG
  38.  
  39. # to disallow shell escapes
  40. # NOSHELL = -DNOSHELL
  41.  
  42. # choose your poison:
  43. # for SCO Xenix 2.3 and SCO Unix
  44. CFLAGS    = -Ox -DDIDO=23 $(DEBUG) $(NOSHELL)
  45. # for SCO Xenix 2.2
  46. # CFLAGS    = -Ox -DDIDO=22 $(DEBUG) $(NOSHELL)
  47. # for Tandy Xenix 3.2
  48. # CFLAGS    = -O -n -DT6000 $(DEBUG) $(NOSHELL)
  49. # for SCO Xenix on an IBM PC/AT (80286)
  50. # CFLAGS    = -O -i $(DEBUG) $(NOSHELL)
  51. # for "any" Unix or Xenix
  52. # CFLAGS    = -O $(DEBUG) $(NOSHELL)
  53.  
  54. # For SCO Xenix
  55. # LDFLAGS = -ltermcap 
  56. # For SCO Unix, include -lc_s
  57. LDFLAGS = -ltermcap -lc_s
  58.  
  59. # choose a nice home for XC
  60. INSDIR        =/pub/jpr/bin
  61. OWNER        =uucp
  62. GROUP        =bin
  63. BINMODE        =4711
  64. MANDIR        =/usr/man/man
  65. CATMANDIR    =/usr/man/cat
  66. MANEXT        =.L
  67. MANOWN        =bin
  68. MANGRP        =bin
  69. MANMODE        =0444
  70. SHRINK        =compress
  71.  
  72. # you should have all of these files:
  73. MANIFEST= .autocis .uni .callhq .exrc .phonelist .xc Makefile README\
  74.             myman xcb+.c xcdbglog.c xcdial.c xc.h xc.nro xcmain.c\
  75.             xcport.c xcscrpt.c xcsubs.c xcterm.c xcxmdm.c
  76.  
  77. OBJS    = xcmain.o xcb+.o xcdbglog.o xcdial.o xcport.o xcscrpt.o xcsubs.o\
  78.             xcterm.o xcxmdm.o
  79.  
  80. xc:     $(OBJS)
  81.     $(CC) $(CFLAGS) $(OBJS) -o xc $(LDFLAGS) 
  82.  
  83. install: xc
  84.     @ls -l xc
  85.     -mv $(INSDIR)/xc $(INSDIR)/xc-
  86.     cp xc $(INSDIR)/xc
  87.     strip $(INSDIR)/xc
  88.     chown $(OWNER) $(INSDIR)/xc
  89.     chgrp $(GROUP) $(INSDIR)/xc
  90.     chmod $(BINMODE) $(INSDIR)/xc
  91.     -@ls -l $(INSDIR)/xc $(INSDIR)/xc-
  92.  
  93. man: xc.nro
  94.     cp xc.nro $(MANDIR)$(MANEXT)/xc$(MANEXT)
  95.     chown $(MANOWN) $(MANDIR)$(MANEXT)/xc$(MANEXT)
  96.     chgrp $(MANGRP) $(MANDIR)$(MANEXT)/xc$(MANEXT)
  97.     chmod $(MANMODE) $(MANDIR)$(MANEXT)/xc$(MANEXT)
  98.     -$(SHRINK) $(MANDIR)$(MANEXT)/xc$(MANEXT)
  99.     touch man
  100.  
  101. catman: xc.nro
  102.     tbl xc.nro| nroff myman - | col > $(CATMANDIR)$(MANEXT)/xc$(MANEXT)
  103.     chown $(MANOWN) $(CATMANDIR)$(MANEXT)/xc$(MANEXT)
  104.     chgrp $(MANGRP) $(CATMANDIR)$(MANEXT)/xc$(MANEXT)
  105.     chmod $(MANMODE) $(CATMANDIR)$(MANEXT)/xc$(MANEXT)
  106.     -$(SHRINK) $(CATMANDIR)$(MANEXT)/xc$(MANEXT)
  107.     touch catman
  108.  
  109. lint:
  110.     lint $(CFLAGS) $(LDFLAGS) -p xc*.c | less
  111.  
  112. clean:
  113.     rm -f $(OBJS) xc core
  114.  
  115. $(OBJS): xc.h
  116.  
  117. shar:
  118.     shar -a README .autocis .uni .callhq .exrc .phonelist .xc Makefile\
  119.         xc.h xcdbglog.c xcsubs.c > xc1.shar
  120.     shar -a xcb+.c xcport.c myman> xc2.shar
  121.     shar -a xc.nro > xc3.shar
  122.     shar -a xcscrpt.c > xc4.shar
  123.     shar -a xcdial.c xcmain.c xcterm.c xcxmdm.c > xc5.shar
  124.     @ls -l *.shar
  125.  
  126. taz:
  127.     tar cf - $(MANIFEST) | compress > XC.TAR.Z
  128.     @ls -l *Z
  129.  
  130. lzh:
  131.     lharc c XC $(MANIFEST)
  132.  
  133. shark:
  134.     shark $(MANIFEST) > XC.SHK
  135.     @ls -l *SHK
  136.  
  137. mail:
  138.     shark README .phonelist .xc .uni xc.h xcmain.c xcdial.c\
  139.         xcport.c xcsubs.c xcdbglog.c > XC.SHARK1
  140.     shark myman xcb+.c xcscrpt.c > XC.SHARK2
  141.     shark Makefile xcterm.c xcxmdm.c xc.nro .autocis .exrc .callhq > XC.SHARK3
  142.     @ls -l *SHARK*
  143.