BSD 3 development
[unix-history] / .ref-BSD-2 / src / csh / makefile
CommitLineData
ccf82a67
BJ
1#
2# Skeleton for version 7
3#
4BINDIR=/bin
5CFLAGS= -O -Ddebug -DTELL
6XSTR= /usr/ucb/xstr
7ED= -ed
8AS= -as
9RM= -rm
10CXREF= /usr/ucb/cxref
11
12#
13# strings.o must be last in OBJS since it can change when previous files compile
14#
15OBJS=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
28a.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#
34strings.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
41sh.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
48lint:
49 lint sh*.h sh*.c
50
51print:
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
59install: a.out sh.local.h
60 ${RM} ${BINDIR}/csh
61 cp a.out ${BINDIR}/csh
62
63clean:
64 ${RM} -f a.out strings x.c xs.c
65 ${RM} -f *.o