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.pc < prev    next >
Encoding:
Makefile  |  1990-12-28  |  3.7 KB  |  138 lines

  1. # Minix-PC 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/bin
  14. OBJS=    blk.s cmd1.s cmd2.s curses.s cut.s ex.s input.s main.s misc.s\
  15.     modify.s move1.s move2.s move3.s move4.s move5.s opts.s recycle.s\
  16.     redraw.s regexp.s regsub.s system.s tio.s tmp.s vars.s vcmd.s vi.s
  17. #    pc.s sysdos.s tinytcap.s
  18. #    atari.s
  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. CC=    cc -i
  29. CFLAGS=    -O -DNO_EXTENSIONS -DNO_CHARATTR -DNO_CURSORSHAPE -DNO_SHOWMODE \
  30.     -DNO_DIGRAPH -DNO_MAGIC
  31. LIBS=
  32.  
  33. all: $(PROGS)
  34.  
  35. elvis: $(OBJS) $(EXTRA)
  36.     $(CC) -o elvis $(OBJS) $(EXTRA) $(LIBS)
  37.  
  38. ctags: ctags.c
  39.     $(CC) $(CFLAGS) ctags.c -o ctags
  40.  
  41. ref: ref.c
  42.     $(CC) $(CFLAGS) ref.c -o ref
  43.  
  44. virec: virec.c
  45.     $(CC) $(CFLAGS) virec.c -o virec
  46.  
  47. # The file cmd1.c is compiled with the extra flag -DDATE="today's date".
  48. # This date is reported when elvis is run and the :version command is given.
  49. # If you have trouble defining the date in this way, then just comment out
  50. # these two lines so cmd1.c is compiled normally.  The :version command
  51. # won't report the compilation date, but that's really no big deal.
  52. cmd1.s: cmd1.c vi.h
  53.     eval $(CC) -c $(CFLAGS) -DDATE=\'\"`date`\"\' cmd1.c
  54.  
  55. # This just says that a change to nomagic.c is effectively a change to regexp.c
  56. regexp.s: nomagic.c
  57.  
  58. ##############################################################################
  59. install: $(PROGS)
  60.     cp $(PROGS) $(BIN)
  61.     (cd $(BIN); chown bin $(PROGS))
  62.     (cd $(BIN); chmod 755 $(PROGS))
  63.     rm -f $(BIN)/ex $(BIN)/view $(BIN)/vi
  64.     ln $(BIN)/elvis $(BIN)/ex
  65.     ln $(BIN)/elvis $(BIN)/view
  66.     ln $(BIN)/elvis $(BIN)/vi
  67.  
  68. clean:
  69.     rm -f *.s *.uue core
  70.  
  71. clobber: clean
  72.     rm -f tags refs $(PROGS)
  73.  
  74. which:
  75.     @echo 'Minix-PC'
  76.  
  77. tags refs: ctags
  78.     ./ctags -r *.[ch]
  79.  
  80. uue: elvis1.uue elvis2.uue elvis3.uue elvis4.uue elvis5.uue elvis6.uue
  81.  
  82. elvis1.uue: $(SRC1)
  83.     tar cf elvis1.tar $(SRC1)
  84.     compress -b13 elvis1.tar
  85.     uuencode elvis1.tar.Z <elvis1.tar.Z >elvis1.uue
  86.     rm elvis1.tar*
  87.  
  88. elvis2.uue: $(SRC2)
  89.     tar cf elvis2.tar $(SRC2)
  90.     compress -b13 elvis2.tar
  91.     uuencode elvis2.tar.Z <elvis2.tar.Z >elvis2.uue
  92.     rm elvis2.tar*
  93.  
  94. elvis3.uue: $(SRC3)
  95.     tar cf elvis3.tar $(SRC3)
  96.     compress -b13 elvis3.tar
  97.     uuencode elvis3.tar.Z <elvis3.tar.Z >elvis3.uue
  98.     rm elvis3.tar*
  99.  
  100. elvis4.uue: $(SRC4)
  101.     tar cf elvis4.tar $(SRC4)
  102.     compress -b13 elvis4.tar
  103.     uuencode elvis4.tar.Z <elvis4.tar.Z >elvis4.uue
  104.     rm elvis4.tar*
  105.  
  106. elvis5.uue: $(SRC5)
  107.     tar cf elvis5.tar $(SRC5)
  108.     compress -b13 elvis5.tar
  109.     uuencode elvis5.tar.Z <elvis5.tar.Z >elvis5.uue
  110.     rm elvis5.tar*
  111.  
  112. elvis6.uue: $(SRC6)
  113.     tar cf elvis6.tar $(SRC6)
  114.     compress -b13 elvis6.tar
  115.     uuencode elvis6.tar.Z <elvis6.tar.Z >elvis6.uue
  116.     rm elvis6.tar*
  117.  
  118. sh: elvis1.sh elvis2.sh elvis3.sh elvis4.sh elvis5.sh elvis6.sh
  119.  
  120. elvis1.sh: $(SRC1)
  121.     shar $(SRC1) >elvis1.sh
  122.  
  123. elvis2.sh: $(SRC2)
  124.     shar $(SRC2) >elvis2.sh
  125.  
  126. elvis3.sh: $(SRC3)
  127.     shar $(SRC3) >elvis3.sh
  128.  
  129. elvis4.sh: $(SRC4)
  130.     shar $(SRC4) >elvis4.sh
  131.  
  132. elvis5.sh: $(SRC5)
  133.     shar $(SRC5) >elvis5.sh
  134.  
  135. elvis6.sh: $(SRC6)
  136.     shar $(SRC6) >elvis6.sh
  137.  
  138.