home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / letters / Makefile < prev    next >
Encoding:
Makefile  |  1992-01-02  |  2.2 KB  |  78 lines

  1. #
  2. # Makefile for letters, a game to help improve typing skills
  3. #
  4. # copyright 1991 by Larry Moss (lm03_cif@uhura.cc.rochester.edu)
  5. #
  6.  
  7. CC = cc
  8. #CC = gcc
  9. #SYSTYPE = SYSV
  10. #SYSTYPE = NEXT
  11. SYSTYPE = BSD
  12. # if you don't have job control add -DNOJOB to CFLAGS
  13. CFLAGS = -O -D$(SYSTYPE) -DHIGHSCORES=\"$(LIBDIR)/letters.high\" \
  14.     -DDICTIONARY=\"$(DICTIONARY)\"
  15. LDFLAGS = -ltermcap
  16. BINDIR = $(HOME)/bin-sun4
  17. MANDIR = $(HOME)/man/man$(MANEXT)
  18. MANEXT = 6
  19. LIBDIR = $(HOME)/lib
  20. DICTIONARY = /usr/dict/words
  21. #DICTIONARY = dictfile
  22.  
  23. # next line only needed if you need to create a dictionary file.  The files
  24. # in this directory will be used to make a wordlist.
  25. DOCDIR = $(HOME)/man
  26.  
  27. # If your machine doesn't have usleep uncomment it in the following line.
  28. # I know this includes ultrix 4.2 and hp-ux 7.? and many sys V based machines.
  29. # Don't know about others. if you need usleep and your machine does not have
  30. # select, change usleep.o to usleep5.o (mostly sysV machines).
  31. OBJS = letters.o kinput.o term.o word.o highscore.o # usleep.o
  32.  
  33. # The following line will stop gcc from complaining about the arguments
  34. # sun's make uses.  It shouldn't bother anyone else.
  35. .c.o:
  36.     $(CC) $(CFLAGS) -c $<
  37.  
  38. letters: $(OBJS)
  39.     $(CC) $(CFLAGS) $(OBJS) -o letters $(LDFLAGS)
  40.  
  41. letters.o word.o kinput.o: \
  42.         kinput.h
  43. letters.o term.o highscore.o kinput.o: \
  44.         term.h
  45. letters.o highscore.o kinput.o: \
  46.         terms.h
  47. word.o highscore.o letters.o: \
  48.         config.h
  49.  
  50. install: letters
  51.     install -s -m 2755 letters $(BINDIR)
  52.     sed -e 's;LIBDIR;$(LIBDIR);' -e 's;DICTIONARY;$(DICTIONARY);'\
  53.         letters.man > letters.$(MANEXT)
  54.     install -c -m 0644 letters.$(MANEXT) $(MANDIR)/letters.$(MANEXT)
  55.     if [ ! -f $(LIBDIR)/letters.high ] ;then \
  56.         install -c -m 0664 letters.high $(LIBDIR) ;fi
  57.  
  58. install_hpux: letters
  59.     install -c $(BINDIR) letters
  60.     install -c $(MANDIR) letters.man
  61.     install -c $(LIBDIR) letters.high
  62.     chmod 0666 $(LIBDIR)/letters.high
  63.  
  64. clean:
  65.     rm -f rm *.o letters letters.$(MANEXT)
  66.  
  67. shar:
  68.     shar -o letters.shar *.[ch] Makefile letters.man letters.high README
  69.  
  70. tar:
  71.     tar cf letters.tar *.[ch] Makefile letters.man letters.high README
  72.  
  73. dict:
  74.     awk '{ for (i = 0; i <= NF; ++i)\
  75.         if($$i ~ /^[a-zA-Z][a-z]*$$/) { print $$i } }'\
  76.         `find $(DOCDIR) -type f -print` |\
  77.         sort -u > $(DICTIONARY)
  78.