1# 2# Unix version 7. 3# 4# Sccs Id = "@(#)Makefile 2.1 07/01/81"; 5# 6 7CFLAGS=-O -DVMUNIX -DV7 8XSTR=/usr/ucb/xstr 9DESTDIR=/usr/src 10CTAGS=/usr/ucb/ctags -w 11VPRINT=/usr/ucb/vprint 12CGRAF=/ja/rigel/rigel/bin/cgraf 13LIBES=-ljobs 14ED=-ed 15AS=-as 16RM=-rm 17OBJS=aux.o cmd1.o cmd2.o cmd3.o cmdtab.o collect.o edit.o fio.o \ 18 getname.o head.o v7.local.o lock.o optim.o names.o lex.o list.o main.o \ 19 quit.o send.o strings.o temp.o tty.o vars.o version.o \ 20 errlst.o str.o npopen.o 21 22SRCS=aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c edit.c fio.c \ 23 getname.c head.c v7.local.c lock.c optim.c names.c lex.c list.c main.c \ 24 quit.c send.c strings.c temp.c tty.c vars.c errlst.c 25 26HDRS=rcv.h def.h glob.h v7.local.h local.h 27 28S = $(SRCS) $(HDRS) 29 30# 31# Special massaging of C files for sharing of strings 32# 33.c.o: 34 ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - 35 ${CC} -c ${CFLAGS} x.c 36 mv x.o $*.o 37 @$(RM) -f x.c 38 39Mail: $S $(OBJS) tags 40 $(RM) -f Mail 41 $(CC) -n -o Mail $(OBJS) $(LIBES) 42 @size Mail 43 44mail.g: $(SRCS) 45 $(CGRAF) $(SRCS) > mail.g 46 47install: 48 install -s Mail ${DESTDIR}/usr/ucb 49 cp Mail.help* ${DESTDIR}/usr/lib 50 cd ${DESTDIR}/usr/ucb; rm -f mail; ln Mail mail 51 52$S: 53 sccs get $@ 54 55srcs: $S 56 57tags: 58 ${CTAGS} *.c; 59 60clean: 61 $(RM) -f *.o 62 rm -f Mail a.out fmt x.c xs.c tags core 63 cp /dev/null strings 64 cp /dev/null version.c 65 66lint: 67 lint $(CFLAGS) $(SRCS) 68 69fmt: fmt.c head.c 70 $(CC) fmt.c head.c -o fmt 71 $(RM) fmt.o head.o 72 size fmt 73 74str.o: strings 75 $(XSTR) 76 $(CC) -R -c xs.c 77 mv xs.o str.o 78 $(RM) xs.c 79 80cmdtab.o: cmdtab.c 81 $(CC) -R -c $(CFLAGS) cmdtab.c 82 83errlst.o: errlst.c 84 ${CC} -E ${CFLAGS} errlst.c | ${XSTR} -c - 85 ${CC} ${CFLAGS} -R x.c 86 mv x.o errlst.o 87 88# 89# Make the version file. /tmp is always changing. 90# 91version.c: # /tmp 92 /bin/sh version > version.c 93 94print: 95 @$(VPRINT) makefile rcv.h def.h glob.h local.h v7.local.h $(SRCS) fmt.c; 96 97wc: 98 @wc rcv.h def.h glob.h local.h v7.local.h $(SRCS) 99 100sc: 101 @grep -c \; rcv.h def.h glob.h local.h v7.local.h $(SRCS) 102