BSD 3 development
[unix-history] / .ref-BSD-2 / src / Mail / makefile
CommitLineData
150e3e11
KS
1#
2# Version 7
3#
4CFLAGS=-O -I.
5XSTR=/usr/ucb/xstr
6CTAGS=/usr/ucb/ctags
7ED=-ed
8AS=-as
9RM=-rm
10OBJS=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
23all: fmt Mail tags
24
25Mail: $(OBJS) tags
26 $(CC) -n -o Mail $(OBJS) -s
27
28tags:
29 ${CTAGS} *.c;
30
31install: 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
42clean:
43 $(RM) -f *.o
44 $(RM) -f Mail a.out strings fmt x.c xs.c tags
45
46lint:
47 lint aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \
48head.c getname.c names.c lex.c list.c main.c quit.c send.c strings.c \
49temp.c tty.c
50
51fmt: fmt.c head.c
52 $(CC) -I/usr/include/retrofit fmt.c head.c -o fmt
53 $(RM) fmt.o head.o
54
55print:
56 pr bugs
57 pr makefile
58 ls -l | pr -h "RCV directory"
59 sh printhem
60
61str.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
68cmdtab.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
74errlst.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#
84version.c: /tmp
85 /bin/sh version > version.c