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