home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / cmd / learn / makefile < prev    next >
Encoding:
Makefile  |  1979-01-15  |  1.4 KB  |  59 lines

  1. LESSONS = files editor morefiles macros eqn C
  2.  
  3. FILES = lrndef lrnref \
  4.     copy.c dounit.c learn.c list.c \
  5.     makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \
  6.     start.c whatnow.c wrapup.c \
  7.     lcount.c tee.c \
  8.     makefile
  9.  
  10. OBJECTS = copy.o dounit.o learn.o list.o mem.o \
  11.     makpipe.o maktee.o mysys.o selsub.o selunit.o \
  12.     start.o whatnow.o wrapup.o
  13.  
  14. CFLAGS = -O
  15. LIBRARY =
  16. LLIB    = /usr/lib/learn
  17.  
  18. cp:    all
  19.     cp learn /bin
  20.     cp tee $(LLIB)
  21.     cp lcount $(LLIB)
  22.     rm learn tee lcount *.o
  23.     @echo "Now do 'make lessons' if you need to extract the lesson archives"
  24.     @echo "Then do 'make play; make log' to make playpen and log directories"
  25.  
  26. cmp:    all
  27.     cmp learn /bin/learn
  28.     cmp tee $(LLIB)/tee
  29.     cmp lcount $(LLIB)/lcount
  30.     rm learn tee lcount *.o
  31.  
  32. all:    learn tee lcount
  33.  
  34. learn: $(OBJECTS)
  35.     cc -n -s -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
  36.  
  37. $(OBJECTS): lrnref
  38. learn.o: lrndef
  39.  
  40. lcount tee:
  41.     cc $(CFLAGS) -s -n $@.c -o $@ $(LIBRARY)
  42.  
  43. lessons:    $(LESSONS)
  44.  
  45. $(LESSONS):
  46.     -rm -r $(LLIB)/$@
  47.     mkdir $(LLIB)/$@
  48.     (cd $(LLIB)/$@; ar x ../$@.a)
  49.  
  50. play log:
  51.     -rm -r $(LLIB)/$@; mkdir $(LLIB)/$@; chmod +w $(LLIB)/$@
  52.  
  53. check:
  54.     -@test -r $(LLIB)/tee || echo 'tee not present; make tee'
  55.     -@test -r $(LLIB)/lcount || echo 'lcount not present; make lcount'
  56.     -@test -r $(LLIB)/play || echo 'play directory not present; make play'
  57.     -@test -r $(LLIB)/log || echo 'log directory not present; make log'
  58.     -@for i in $(LESSONS); do test -r $(LLIB)/$$i/L0 || echo $$i not unarchived, make $$i; done
  59.