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.v6 < prev    next >
Makefile  |  1980-02-17  |  2KB  |  85 lines

  1. #
  2. # Skeleton for version 6
  3. #
  4. # Flags you can define
  5. #    NOHELP        login doesnt setenv HOME, thus do ./.login
  6. #    NORMAL6        standard version 6 arg lists, number of units
  7. #    TELL        have tell system call
  8. #
  9. # The -t1 version of the C compiler makes text larger and data smaller.
  10. # Use it if you have it; it isn't critical
  11. #
  12. BINDIR=    /bin
  13. CFLAGS=    -O -I/usr/include/retrofit -Dpdp11 -t1 -DNORMAL6 -DNOHELP
  14. XSTR=    /usr/ucb/xstr
  15. ED=    -ed
  16. AS=    -as
  17. RM=    -rm
  18. CXREF=    /usr/ucb/cxref
  19.  
  20. #
  21. # strings.o must be last in OBJS since it can change when previous files compile
  22. #
  23. OBJS=sh.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.func.o sh.glob.o sh.hist.o \
  24.     sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.sem.o sh.set.o \
  25.     sh.wait.o alloc.o sh.init.o 11printf.o getpwent.o getpwnam.o  \
  26.     getpwuid.o errlst.o strings.o
  27.  
  28. #
  29. # Special massaging of C files for sharing of strings
  30. #
  31. .c.o:
  32.     ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  33.     ${CC} -c ${CFLAGS} x.c 
  34.     mv x.o $*.o
  35.  
  36. a.out: ${OBJS} sh.local.h
  37.     ${CC} -n ${OBJS} -lretro -lS
  38.  
  39. #
  40. # strings.o and sh.init.o are specially processed to be shared
  41. #
  42. strings.o: strings
  43.     ${XSTR}
  44.     ${CC} -S xs.c
  45.     ${ED} - <:rofix xs.s
  46.     ${AS} -o strings.o xs.s
  47.     ${RM} xs.s
  48.  
  49. sh.init.o:
  50.     ${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c -
  51.     ${CC} ${CFLAGS} -S x.c
  52.     echo ${ED} - <:rofix x.s
  53.     ${AS} - -o sh.init.o x.s
  54.     ${RM} x.s
  55.     
  56. errlst.o:
  57.     ${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c -
  58.     ${CC} ${CFLAGS} -S x.c
  59.     echo ${ED} - <:rofix x.s
  60.     ${AS} -o errlst.o x.s
  61.     ${RM} x.s
  62.  
  63. lint:
  64.     lint sh*.h sh*.c
  65.  
  66. print:
  67.     @pr READ_ME
  68.     @pr makefile makefile.*
  69.     @(size -l a.out; size *.o) | pr -h SIZES
  70.     @${CXREF} sh*.c | pr -h XREF
  71.     @ls -l | pr 
  72.     @pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  73.  
  74. install: a.out sh.local.h
  75.     cp a.out x
  76.     strip x
  77.     ${RM} -f ${BINDIR}/csh
  78.     mv x ${BINDIR}/csh
  79.     ${RM} -f ${BINDIR}/makesh
  80.     ln ${BINDIR}/csh ${BINDIR}/makesh
  81.  
  82. clean:
  83.     ${RM} -f a.out strings x.c xs.c
  84.     ${RM} -f *.o
  85.