added in nifty changes from branch to make easier to compile
[unix-history] / usr / src / usr.bin / mail / makefile.ing
CommitLineData
0decb711
KS
1#
2# Unix version 6 (Ingres).
3#
79ddb121 4# Sccs Id = "@(#)makefile.ing 2.1 %G%";
0decb711
KS
5#
6
7CFLAGS=-O -DINGRES -Dsignal=Signal -I/usr/include/retrofit
8XSTR=/usr/ucb/xstr
9DESTDIR=/usr/src
10CTAGS=/usr/new/ctags
11ED=-ed
12AS=-nas
13RM=-rm
14CC=ncc
15OBJS=aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o getname.o \
16 head.o ing.local.o lex.o list.o lock.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 Signal.o str.o
19
20SRCS=aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c getname.c \
21 head.c ing.local.c lex.c list.c lock.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 Signal.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
40xmail: $(OBJS) tags
41 $(CC) -o xmail $(OBJS) -lretro -lS
42 @size xmail
43
44Mail: $(OBJS) tags
45 $(CC) -n -o Mail $(OBJS) -lretro -lS
46 @size Mail
47
48tags:
49 ${CTAGS} *.c;
50
51clean:
52 $(RM) -f *.o
53 rm -f Mail a.out fmt x.c xs.c tags core
54 cp /dev/null strings
55 cp /dev/null version.c
56
57lint:
58 lint $(CFLAGS) $(SRCS)
59
60fmt: fmt.c head.c
61 $(CC) fmt.c head.c -o fmt -lretro -lS
62 $(RM) fmt.o head.o
63 size fmt
64
65str.o: strings
66 $(XSTR)
67 $(CC) -S xs.c
68 $(ED) - <:rofix xs.s
69 $(AS) -o str.o xs.s
70 $(RM) xs.s
71
72cmdtab.o: cmdtab.c
73 $(CC) -S $(CFLAGS) cmdtab.c
74 $(ED) - <:rofix cmdtab.s
75 $(AS) - -o cmdtab.o cmdtab.s
76 $(RM) cmdtab.s
77
78errlst.o: errlst.c
79 ${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c -
80 ${CC} ${CFLAGS} -S x.c
81 ${ED} - <:rofix x.s
82 ${AS} -o errlst.o x.s
83 ${RM} x.s
84
85#
86# Make the version file. /tmp is always changing.
87#
88version.c:
89 /bin/sh version > version.c
90
91Signal.o: Signal.c
92 $(CC) -c -O Signal.c
93
94print:
95 @pr rcv.h def.h glob.h local.h ing.local.h $(SRCS)
96 @pr fmt.c