Commit | Line | Data |
---|---|---|
273045c8 | 1 | # |
761330fe DF |
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.11 5.1 (Berkeley) %G% | |
273045c8 | 7 | # |
761330fe | 8 | # Unix version 7. |
273045c8 | 9 | # |
e4b41c33 CS |
10 | # If you are compiling this for a nonseparate I/D machine, |
11 | # you must: | |
12 | # change the definitions of LDFLAGS, CFLAGS, LIBES, | |
13 | # SIGRETROSRC, and SIGRETROOBJ | |
14 | # make Mail40 rather than Mail | |
15 | # | |
16 | # Mail is too large to fit on a nonseparate I/D machine without | |
17 | # text overlays. | |
18 | # | |
19 | # If you do not have a vfork system call or do not support | |
20 | # job control, you must change the definition of OPTIONS. | |
21 | # | |
22 | ||
23 | OPTIONS= -DV7 -DVMUNIX # vfork and job control | |
24 | #OPTIONS= -DV7 # no vfork or no job control | |
25 | ||
26 | LDFLAGS= -i # for separate I/D machines | |
27 | #LDFLAGS= -n # for nonseparate I/D machines | |
273045c8 | 28 | |
e4b41c33 CS |
29 | CFLAGS= -O ${OPTIONS} ${INCLUDES} # for separate I/D machines |
30 | #CFLAGS= -O -V ${OPTIONS} ${INCLUDES} # for nonseparate I/D machines | |
31 | ||
32 | LIBES= -ljobs -lc # for separate I/D machines | |
33 | #LIBES= -lovjobs -lovc # for nonseparate I/D machines | |
34 | ||
35 | SIGRETROSRC= # for those with job control | |
36 | SIGRETROOBJ= # for those with job control | |
37 | #SIGRETROSRC= sigretro.c # for those without job control | |
38 | #SIGRETROOBJ= sigretro.o # for those without job control | |
39 | ||
40 | XSTR= /usr/ucb/xstr | |
41 | DESTDIR= / | |
42 | CTAGS= /usr/ucb/ctags -w | |
43 | ED= -ed | |
44 | AS= -as | |
45 | RM= -rm | |
46 | OBJS=aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o config.o edit.o fio.o \ | |
273045c8 KS |
47 | getname.o head.o v7.local.o lock.o lex.o list.o main.o \ |
48 | names.o optim.o popen.o quit.o send.o strings.o temp.o tty.o \ | |
e4b41c33 | 49 | vars.o version.o errlst.o str.o ${SIGRETROOBJ} |
273045c8 KS |
50 | |
51 | SRCS=aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c config.c edit.c fio.c \ | |
52 | getname.c head.c v7.local.c lock.c lex.c list.c main.c \ | |
53 | names.c optim.c popen.c quit.c send.c strings.c temp.c tty.c vars.c \ | |
e4b41c33 | 54 | errlst.c version.c ${SIGRETROSRC} |
273045c8 | 55 | |
e4b41c33 | 56 | HDRS=rcv.h configdefs.h def.h glob.h v7.local.h local.h |
273045c8 KS |
57 | |
58 | S = $(SRCS) $(HDRS) | |
59 | ||
e4b41c33 CS |
60 | # |
61 | # Special massaging of C files for sharing of strings | |
62 | # | |
63 | .c.o: | |
64 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
65 | ${CC} -c ${CFLAGS} x.c | |
66 | mv x.o $*.o | |
67 | @$(RM) -f x.c | |
68 | ||
273045c8 KS |
69 | Mail: $S $(OBJS) |
70 | $(RM) -f Mail | |
71 | @echo Loading ... | |
e4b41c33 | 72 | @${CC} ${LDFLAGS} -o Mail ${OBJS} ${LIBES} |
273045c8 KS |
73 | @size Mail |
74 | ||
e4b41c33 CS |
75 | Mail40: $S $(OBJS) |
76 | $(RM) -f Mail | |
77 | @echo Loading ... | |
78 | @ld -X /lib/crt0.o ${LDFLAGS} -o Mail \ | |
79 | -Z getname.o names.o optim.o popen.o send.o strings.o temp.o \ | |
80 | v7.local.o vars.o \ | |
81 | -Z edit.o head.o lex.o list.o lock.o main.o quit.o tty.o \ | |
82 | -Z cmd1.o cmd2.o cmd3.o collect.o ${SIGRETROOBJ} \ | |
83 | -L aux.o cmdtab.o config.o errlst.o fio.o \ | |
84 | str.o version.o ${LIBES} | |
85 | @size Mail | |
273045c8 KS |
86 | |
87 | install: | |
88 | install -s Mail ${DESTDIR}/usr/ucb | |
c5153ce5 | 89 | cp misc/Mail.help* ${DESTDIR}/usr/lib |
273045c8 KS |
90 | cd ${DESTDIR}/usr/ucb; rm -f mail; ln Mail mail |
91 | ||
92 | $S: | |
93 | sccs get $@; | |
94 | ||
95 | srcs: $S | |
96 | ||
97 | tags: $(SRCS) | |
98 | ${CTAGS} $(SRCS); | |
99 | ||
100 | clean: | |
101 | $(RM) -f *.o | |
e4b41c33 | 102 | rm -f Mail a.out fmt x.c xs.c core |
273045c8 KS |
103 | cp /dev/null strings |
104 | ||
105 | lint: | |
106 | lint $(CFLAGS) $(SRCS) | |
107 | ||
108 | fmt: fmt.c head.c | |
e4b41c33 | 109 | $(CC) fmt.c head.c -O -o fmt |
273045c8 KS |
110 | $(RM) fmt.o head.o |
111 | size fmt | |
112 | ||
e4b41c33 CS |
113 | str.o: strings |
114 | $(XSTR) | |
115 | $(CC) -c $(CFLAGS) xs.c | |
116 | mv xs.o str.o | |
117 | $(RM) xs.c | |
118 | ||
119 | config.o: config.c | |
120 | $(CC) -c $(CFLAGS) config.c | |
121 | ||
122 | cmdtab.o: cmdtab.c | |
123 | $(CC) -c $(CFLAGS) cmdtab.c | |
124 | ||
125 | errlst.o: errlst.c | |
126 | ${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c - | |
127 | ${CC} ${CFLAGS} -c x.c | |
128 | mv x.o errlst.o | |
273045c8 KS |
129 | |
130 | wc: | |
131 | @wc rcv.h def.h glob.h local.h v7.local.h $(SRCS) | |
132 | ||
133 | sc: | |
134 | @grep -c \; rcv.h def.h glob.h local.h v7.local.h $(SRCS) |