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