xref: /original-bsd/usr.bin/mail/makefile.40 (revision 0b685140)
1#
2# EECS/ERL 11/40 Unix
3#
4# Sccs Id = "@(#)makefile.40	2.1 07/01/81";
5#
6
7CFLAGS=-O -DV40 -I/usr/include/retrofit
8XSTR=/mnt/eric/bin/xstr
9DESTDIR=/usr/src
10CTAGS=/usr/bin/ctags
11ED=-ed
12CC=ncc
13AS=-nas
14RM=-rm
15OBJS=aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o \
16	getname.o head.o 40.local.o lex.o list.o main.o names.o optim.o \
17	quit.o send.o strings.o temp.o tty.o vars.o version.o \
18	errlst.o str.o
19
20SRCS=aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \
21	getname.c head.c v6.local.c lex.c list.c main.c names.c optim.c \
22	quit.c send.c strings.c temp.c tty.c vars.c version.c \
23	errlst.c str.c
24
25#
26# Special massaging of C files for sharing of strings
27#
28.c.o:
29	${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
30	${CC} -c ${CFLAGS} x.c
31	${RM} -f $*.o
32	mv x.o $*.o
33
34all:	Mail fmt
35
36install:	all
37	cp Mail $(DESTDIR)
38	cp fmt $(DESTDIR)
39
40Mail:	$(OBJS) tags
41	$(CC) -n -o Mail $(OBJS) -lretro -lS
42	@size Mail
43
44tags:
45	${CTAGS} *.c;
46
47clean:
48	$(RM) -f *.o
49	rm -f Mail a.out fmt x.c xs.c tags core
50	cp /dev/null strings
51	cp /dev/null version.c
52
53lint:
54	lint $(CFLAGS) $(SRCS)
55
56fmt:	fmt.c head.c
57	$(CC) fmt.c head.c -o fmt -lretro -lS
58	$(RM) fmt.o head.o
59	size fmt
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
86
87print:
88	@pr rcv.h def.h glob.h local.h v6.local.h $(SRCS)
89	@pr fmt.c
90