home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1705 / Makefile.bsd < prev    next >
Encoding:
Makefile  |  1990-12-28  |  3.5 KB  |  132 lines

  1. # BSD UNIX Makefile for ELVIS - a clone of `vi`
  2. #
  3. # Use `make` to compile all programs
  4. # Use `make install` to copy the programs to the BIN directory
  5. # Use `make clean` to remove all object files
  6. # Use `make clobber` to remove everything except source & documentation
  7. # Use `make tags` to build new "tags" and "refs" files
  8. # Use `make uue` to produce uuencoded compressed tar archives of the source
  9. # Use `make sh` to produce shar archives of the source
  10.  
  11. PROGS=    elvis ctags ref virec
  12. #PROGS=    elvis.exe ctags.exe ref.exe virec.exe wildcard.exe
  13. BIN=    /usr/local/bin
  14. OBJS=    blk.o cmd1.o cmd2.o curses.o cut.o ex.o input.o main.o misc.o\
  15.     modify.o move1.o move2.o move3.o move4.o move5.o opts.o recycle.o\
  16.     redraw.o regexp.o regsub.o system.o tio.o tmp.o vars.o vcmd.o vi.o
  17. #    pc.o sysdos.o tinytcap.o
  18. #    atari.o
  19. SRC1=    elvis.man
  20. SRC2=    Elvis.lnk Elvis.mak Elvis.prj Makefile.bsd Makefile.s5 Makefile.st\
  21.     Makefile.pc Makefile.tos blk.c cmd1.c cmd2.c config.h
  22. SRC3=    atari.c curses.c curses.h cut.c elvis.ndx ex.c input.c main.c misc.c
  23. SRC4=    modify.c move1.c move2.c move3.c move4.c move5.c nomagic.c opts.c pc.c\
  24.     recycle.c redraw.c
  25. SRC5=    regexp.c regexp.h regsub.c sysdos.c system.c tinytcap.c tio.c tmp.c
  26. SRC6=    vars.c vcmd.c vi.c vi.h ctags.c ref.c virec.c wildcard.c shell.c
  27. EXTRA=
  28. CFLAGS=    -O
  29. LIBS=    -ltermcap
  30.  
  31. all: $(PROGS)
  32.  
  33. elvis: $(OBJS) $(EXTRA)
  34.     $(CC) -o elvis $(OBJS) $(EXTRA) $(LIBS)
  35.  
  36. ctags: ctags.c
  37.     $(CC) $(CFLAGS) -DSORT ctags.c -o ctags
  38.  
  39. ref: ref.c
  40.     $(CC) $(CFLAGS) ref.c -o ref
  41.  
  42. virec: virec.c
  43.     $(CC) $(CFLAGS) virec.c -o virec
  44.  
  45. # The file cmd1.c is compiled with the extra flag -DDATE="today's date".
  46. # This date is reported when elvis is run and the :version command is given.
  47. # If you have trouble defining the date in this way, then just comment out
  48. # these two lines so cmd1.c is compiled normally.  The :version command
  49. # won't report the compilation date, but that's really no big deal.
  50. cmd1.o: cmd1.c vi.h
  51.     eval $(CC) -c $(CFLAGS) -DDATE=\'\"`date`\"\' cmd1.c
  52.  
  53. # This just says that a change to nomagic.c is effectively a change to regexp.c
  54. regexp.o: nomagic.c
  55.  
  56. ##############################################################################
  57. install: $(PROGS)
  58.     cp $(PROGS) $(BIN)
  59.     (cd $(BIN); chown bin $(PROGS))
  60.     (cd $(BIN); chmod 755 $(PROGS))
  61.  
  62. clean:
  63.     rm -f *.o *.uue core
  64.  
  65. clobber: clean
  66.     rm -f tags refs $(PROGS)
  67.  
  68. which:
  69.     @echo 'BSD Unix'
  70.  
  71. tags refs: ctags
  72.     ./ctags -r *.[ch]
  73.  
  74. uue: elvis1.uue elvis2.uue elvis3.uue elvis4.uue elvis5.uue elvis6.uue
  75.  
  76. elvis1.uue: $(SRC1)
  77.     tar cf elvis1.tar $(SRC1)
  78.     compress -b13 elvis1.tar
  79.     uuencode elvis1.tar.Z <elvis1.tar.Z >elvis1.uue
  80.     rm elvis1.tar*
  81.  
  82. elvis2.uue: $(SRC2)
  83.     tar cf elvis2.tar $(SRC2)
  84.     compress -b13 elvis2.tar
  85.     uuencode elvis2.tar.Z <elvis2.tar.Z >elvis2.uue
  86.     rm elvis2.tar*
  87.  
  88. elvis3.uue: $(SRC3)
  89.     tar cf elvis3.tar $(SRC3)
  90.     compress -b13 elvis3.tar
  91.     uuencode elvis3.tar.Z <elvis3.tar.Z >elvis3.uue
  92.     rm elvis3.tar*
  93.  
  94. elvis4.uue: $(SRC4)
  95.     tar cf elvis4.tar $(SRC4)
  96.     compress -b13 elvis4.tar
  97.     uuencode elvis4.tar.Z <elvis4.tar.Z >elvis4.uue
  98.     rm elvis4.tar*
  99.  
  100. elvis5.uue: $(SRC5)
  101.     tar cf elvis5.tar $(SRC5)
  102.     compress -b13 elvis5.tar
  103.     uuencode elvis5.tar.Z <elvis5.tar.Z >elvis5.uue
  104.     rm elvis5.tar*
  105.  
  106. elvis6.uue: $(SRC6)
  107.     tar cf elvis6.tar $(SRC6)
  108.     compress -b13 elvis6.tar
  109.     uuencode elvis6.tar.Z <elvis6.tar.Z >elvis6.uue
  110.     rm elvis6.tar*
  111.  
  112. sh: elvis1.sh elvis2.sh elvis3.sh elvis4.sh elvis5.sh elvis6.sh
  113.  
  114. elvis1.sh: $(SRC1)
  115.     shar $(SRC1) >elvis1.sh
  116.  
  117. elvis2.sh: $(SRC2)
  118.     shar $(SRC2) >elvis2.sh
  119.  
  120. elvis3.sh: $(SRC3)
  121.     shar $(SRC3) >elvis3.sh
  122.  
  123. elvis4.sh: $(SRC4)
  124.     shar $(SRC4) >elvis4.sh
  125.  
  126. elvis5.sh: $(SRC5)
  127.     shar $(SRC5) >elvis5.sh
  128.  
  129. elvis6.sh: $(SRC6)
  130.     shar $(SRC6) >elvis6.sh
  131.  
  132.