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