Commit | Line | Data |
---|---|---|
3b86b0f6 DF |
1 | # |
2 | # Copyright (c) 1980 Regents of the University of California. | |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
6 | # @(#)Makefile 5.1 (Berkeley) %G% | |
23d17bca | 7 | # |
e67de284 | 8 | # Berkeley Mail |
23d17bca | 9 | # |
e67de284 SL |
10 | CFLAGS= -O -DVMUNIX -DV7 |
11 | XSTR= /usr/ucb/xstr | |
12 | DESTDIR= | |
13 | CTAGS= /usr/ucb/ctags -w | |
14 | VPRINT= /usr/ucb/print | |
4bc721c3 | 15 | LIBES= |
e67de284 SL |
16 | AS= -as |
17 | RM= -rm | |
18 | OBJS= version.o aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o \ | |
580f3401 | 19 | config.o edit.o fio.o \ |
4e161d3b | 20 | getname.o head.o v7.local.o lex.o list.o main.o \ |
e898bfd5 | 21 | names.o optim.o popen.o quit.o send.o strings.o temp.o tty.o \ |
0804ac6a | 22 | vars.o str.o |
e67de284 | 23 | SRCS= aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c config.c edit.c fio.c \ |
4e161d3b | 24 | getname.c head.c v7.local.c lex.c list.c main.c \ |
e898bfd5 | 25 | names.c optim.c popen.c quit.c send.c strings.c temp.c tty.c vars.c \ |
0804ac6a | 26 | version.c |
e67de284 SL |
27 | HDRS= rcv.h configdefs.h def.h glob.h v7.local.h local.h |
28 | ALL= Mail fmt | |
23d17bca KS |
29 | S = $(SRCS) $(HDRS) |
30 | ||
31 | # | |
32 | # Special massaging of C files for sharing of strings | |
33 | # | |
34 | .c.o: | |
35 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
36 | ${CC} -c ${CFLAGS} x.c | |
37 | mv x.o $*.o | |
7f75a59d | 38 | @$(RM) -f x.c |
23d17bca | 39 | |
e67de284 SL |
40 | all: ${ALL} |
41 | ||
0580a7c7 | 42 | Mail: $S $(OBJS) |
e6ea883a | 43 | $(RM) -f Mail |
0580a7c7 | 44 | @echo Loading ... |
be28921a | 45 | @$(CC) -o Mail $(OBJS) $(LIBES) |
23d17bca KS |
46 | @size Mail |
47 | ||
e67de284 | 48 | install: all |
80974fe4 | 49 | install -s Mail ${DESTDIR}/usr/ucb/Mail |
c5153ce5 | 50 | cp misc/Mail.help* ${DESTDIR}/usr/lib |
80974fe4 | 51 | install -s fmt ${DESTDIR}/usr/ucb/fmt |
23d17bca KS |
52 | cd ${DESTDIR}/usr/ucb; rm -f mail; ln Mail mail |
53 | ||
580f3401 KS |
54 | version.o: version.c |
55 | $(CC) -c -R version.c | |
56 | ||
23d17bca | 57 | $S: |
aeb62787 | 58 | sccs get $@; |
23d17bca | 59 | |
7f75a59d KS |
60 | srcs: $S |
61 | ||
c561ae49 KS |
62 | tags: $(SRCS) |
63 | ${CTAGS} $(SRCS); | |
23d17bca KS |
64 | |
65 | clean: | |
66 | $(RM) -f *.o | |
67 | rm -f Mail a.out fmt x.c xs.c tags core | |
68 | cp /dev/null strings | |
23d17bca KS |
69 | |
70 | lint: | |
71 | lint $(CFLAGS) $(SRCS) | |
72 | ||
73 | fmt: fmt.c head.c | |
74 | $(CC) fmt.c head.c -o fmt | |
75 | $(RM) fmt.o head.o | |
76 | size fmt | |
77 | ||
78 | str.o: strings | |
79 | $(XSTR) | |
cb54cce2 KS |
80 | $(CC) -R -c xs.c |
81 | mv xs.o str.o | |
7f75a59d | 82 | $(RM) xs.c |
23d17bca KS |
83 | |
84 | cmdtab.o: cmdtab.c | |
7f75a59d | 85 | $(CC) -R -c $(CFLAGS) cmdtab.c |
23d17bca | 86 | |
4e79fe45 | 87 | print: $S fmt.c |
8e014b0c | 88 | @$(VPRINT) Makefile rcv.h def.h glob.h local.h v7.local.h $(SRCS) fmt.c |
23d17bca KS |
89 | |
90 | wc: | |
91 | @wc rcv.h def.h glob.h local.h v7.local.h $(SRCS) | |
92 | ||
93 | sc: | |
94 | @grep -c \; rcv.h def.h glob.h local.h v7.local.h $(SRCS) |