Commit | Line | Data |
---|---|---|
241fb0e2 MK |
1 | CFLAGS= -O |
2 | LIBC= /lib/libc.a | |
3 | ||
4 | # Programs that live in subdirectories, and have makefiles of their own. | |
5 | # | |
6 | SUBDIR= cmd.${MACHINE} | |
7 | ||
8 | # Shell scripts that need only be installed and are never removed. | |
9 | # | |
10 | SCRIPT= Correct Spell difftc itroff | |
11 | ||
12 | # C sources that live in the current directory | |
13 | # | |
14 | SRCS= 20b.c 2621.c chgbars.c cpr.c dis.c dl.c \ | |
15 | doorcard.c la.c rinfo.c sdiff.c showtc.c yank.c | |
16 | ||
17 | # C programs that live in the current directory and do not need | |
18 | # explicit make lines. | |
19 | # | |
20 | STD= 20b 2621 chgbars cpr dl doorcard rinfo sdiff yank | |
21 | ||
22 | # C programs that live in the current directory and need explicit make lines. | |
23 | # | |
24 | NSTD= dis showtc | |
25 | ||
26 | # Programs that get installed with special permissions | |
27 | # | |
28 | PERM= la | |
29 | ||
30 | all: ${SUBDIR} ${STD} ${PERM} ${NSTD} | |
31 | ||
32 | ${SUBDIR}: FRC | |
33 | cd $@; make ${MFLAGS} | |
34 | ||
35 | ${STD} ${PERM}: ${LIBC} | |
36 | ${CC} ${CFLAGS} -o $@ $@.c | |
37 | ||
38 | clean cleandir: FRC | |
39 | -for i in ${SUBDIR} cmd.vax cmd.tahoe; do \ | |
40 | (cd $$i; make ${MFLAGS} clean); \ | |
41 | done | |
42 | rm -f a.out core *.s *.o ${STD} ${PERM} ${NSTD} | |
43 | ||
44 | depend: ldepend | |
45 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done | |
46 | ||
47 | ldepend: FRC | |
48 | mkdep -p ${CFLAGS} ${SRCS} | |
49 | ||
50 | install: FRC | |
51 | -for i in ${SUBDIR}; do \ | |
52 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done | |
53 | -for i in ${SCRIPT}; do \ | |
54 | (install -c -o bin -g bin -m 755 $$i.sh ${DESTDIR}/usr/local/$$i); \ | |
55 | done | |
56 | install -s -o bin -g bin -m 755 ${STD} ${NSTD} ${DESTDIR}/usr/local | |
57 | # programs that run with special permissions | |
58 | install -s -o bin -g kmem -m 2755 la ${DESTDIR}/usr/local/la | |
59 | ||
60 | FRC: | |
61 | ||
62 | # Files listed in ${NSTD} and ${OPTIONAL} have explicit make lines given below. | |
63 | ||
64 | showtc dis: | |
65 | ${CC} ${CFLAGS} -o $@ $@.c -ltermcap | |
66 |