Commit | Line | Data |
---|---|---|
150e3e11 KS |
1 | # |
2 | # Version 7 | |
3 | # | |
4 | CFLAGS=-O -I. | |
5 | XSTR=/usr/ucb/xstr | |
6 | CTAGS=/usr/ucb/ctags | |
7 | ED=-ed | |
8 | AS=-as | |
9 | RM=-rm | |
10 | OBJS=aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o \ | |
11 | getname.o head.o v7.local.o names.o lex.o list.o main.o quit.o send.o \ | |
12 | strings.o temp.o tty.o vars.o version.o \ | |
13 | errlst.o str.o | |
14 | ||
15 | # | |
16 | # Special massaging of C files for sharing of strings | |
17 | # | |
18 | .c.o: | |
19 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
20 | ${CC} -c ${CFLAGS} x.c | |
21 | mv x.o $*.o | |
22 | ||
23 | all: fmt Mail tags | |
24 | ||
25 | Mail: $(OBJS) tags | |
26 | $(CC) -n -o Mail $(OBJS) -s | |
27 | ||
28 | tags: | |
29 | ${CTAGS} *.c; | |
30 | ||
31 | install: all | |
32 | cp Mail /usr/ucb/Mail | |
33 | cp fmt /usr/ucb/fmt | |
34 | cp Mail.help /usr/lib/Mail.help | |
35 | cp Mail.help.~ /usr/lib/Mail.help.~ | |
36 | cat /dev/null >> /usr/lib/Mail.rc | |
37 | echo you should add a line of the form | |
38 | echo " " "'set append'" | |
39 | echo to /usr/lib/Mail.rc if the standard system mailer | |
40 | echo adds new mail at the end of the mail file | |
41 | ||
42 | clean: | |
43 | $(RM) -f *.o | |
44 | $(RM) -f Mail a.out strings fmt x.c xs.c tags | |
45 | ||
46 | lint: | |
47 | lint aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ | |
48 | head.c getname.c names.c lex.c list.c main.c quit.c send.c strings.c \ | |
49 | temp.c tty.c | |
50 | ||
51 | fmt: fmt.c head.c | |
52 | $(CC) -I/usr/include/retrofit fmt.c head.c -o fmt | |
53 | $(RM) fmt.o head.o | |
54 | ||
55 | print: | |
56 | pr bugs | |
57 | pr makefile | |
58 | ls -l | pr -h "RCV directory" | |
59 | sh printhem | |
60 | ||
61 | str.o: strings | |
62 | $(XSTR) | |
63 | $(CC) -S xs.c | |
64 | $(ED) - <:rofix xs.s | |
65 | $(AS) -o str.o xs.s | |
66 | $(RM) xs.s | |
67 | ||
68 | cmdtab.o: cmdtab.c | |
69 | $(CC) -S $(CFLAGS) cmdtab.c | |
70 | $(ED) - <:rofix cmdtab.s | |
71 | $(AS) -o cmdtab.o cmdtab.s | |
72 | $(RM) cmdtab.s | |
73 | ||
74 | errlst.o: errlst.c | |
75 | ${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c - | |
76 | ${CC} ${CFLAGS} -S x.c | |
77 | ${ED} - <:rofix x.s | |
78 | ${AS} -o errlst.o x.s | |
79 | ${RM} x.s | |
80 | ||
81 | # | |
82 | # Make the version file. /tmp is always changing. | |
83 | # | |
84 | version.c: /tmp | |
85 | /bin/sh version > version.c |