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