home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Distributions / ucb / spencer_2bsd.tar.gz / 2bsd.tar / src / csh / makefile < prev    next >
Makefile  |  1980-02-17  |  1KB  |  66 lines

  1. #
  2. # Skeleton for version 7
  3. #
  4. BINDIR=/bin
  5. CFLAGS=    -O -Ddebug -DTELL
  6. XSTR=    /usr/ucb/xstr
  7. ED=    -ed
  8. AS=    -as
  9. RM=    -rm
  10. CXREF=    /usr/ucb/cxref
  11.  
  12. #
  13. # strings.o must be last in OBJS since it can change when previous files compile
  14. #
  15. OBJS=sh.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.func.o sh.glob.o sh.hist.o \
  16.     sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.sem.o sh.set.o \
  17.     sh.wait.o alloc.o sh.init.o printf.o getpwent.o getpwnam.o \
  18.     strings.o
  19.  
  20. #
  21. # Special massaging of C files for sharing of strings
  22. #
  23. .c.o:
  24.     ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  25.     ${CC} -c ${CFLAGS} x.c 
  26.     mv x.o $*.o
  27.  
  28. a.out: ${OBJS} sh.local.h
  29.     ${CC} -n ${OBJS}
  30.  
  31. #
  32. # strings.o and sh.init.o are specially processed to be shared
  33. #
  34. strings.o: strings
  35.     ${XSTR}
  36.     ${CC} -S xs.c
  37.     ${ED} - <:rofix xs.s
  38.     ${AS} -o strings.o xs.s
  39.     ${RM} xs.s
  40.  
  41. sh.init.o:
  42.     ${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c -
  43.     ${CC} ${CFLAGS} -S x.c
  44.     ${ED} - <:rofix x.s
  45.     ${AS} -o sh.init.o x.s
  46.     ${RM} x.s
  47.     
  48. lint:
  49.     lint sh*.h sh*.c
  50.  
  51. print:
  52.     @pr READ_ME
  53.     @pr makefile makefile.*
  54.     @(size -l a.out; size *.o) | pr -h SIZES
  55.     @${CXREF} sh*.c | pr -h XREF
  56.     @ls -l | pr 
  57.     @pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  58.  
  59. install: a.out sh.local.h
  60.     ${RM} ${BINDIR}/csh
  61.     cp a.out ${BINDIR}/csh
  62.  
  63. clean:
  64.     ${RM} -f a.out strings x.c xs.c
  65.     ${RM} -f *.o
  66.