1# Makefile for the f77 I/O library 2# @(#)makefile 1.15 06/03/82 3# Originally written by P. Weinberger, Bell Labs, Murray Hill, N.J. 4# Modified by D. Wasley, Univ of California, Berkeley, Calif. 5 6LIB = libI77.a 7CFLAGS = -O 8LPR = lpr 9 10# for CFO 11's 11#ENV = ucb 12#LIBDIR = /usr/$(ENV)/lib 13#TAPE = /dev/nrmt1 14 15# for Vax 16LIBDIR = /usr/lib 17TAPE = /dev/rnmt0.1600 18 19SOURCES = backspace.c close.c dfe.c due.c endfile.c err.c fmt.c \ 20 fmtlib.c iio.c inquire.c lwrite.c lread.c dolio.c open.c \ 21 rdfmt.c rewind.c sfe.c sue.c douio.c util.c wrtfmt.c \ 22 dofio.c f_errlist.c yes_66.c no_66.c \ 23 f_errno.h fiodefs.h fio.h format.h lio.h 24 25OBJECTS = dfe.o due.o iio.o sue.o sfe.o lread.o lwrite.o \ 26 dofio.o douio.o dolio.o \ 27 rdfmt.o wrtfmt.o fmt.o fmtlib.o \ 28 backspace.o rewind.o open.o close.o endfile.o inquire.o \ 29 yes_66.o err.o no_66.o util.o f_errlist.o 30 31all: $(LIB) 32 33$(LIB): $(OBJECTS) Version 34 @echo Loading 35 @rm -f $(LIB) 36 @ar rc $(LIB) $(OBJECTS) Version 37 @chmod 664 $(LIB) 38 @echo "" > /dev/tty 39 40install: $(LIB) libI66.a 41 @-mv $(LIBDIR)/$(LIB) $(LIBDIR)/$(LIB).old 42 cp $(LIB) $(LIBDIR)/$(LIB) 43 ranlib $(LIBDIR)/$(LIB) 44 chmod 644 $(LIBDIR)/$(LIB) 45 @mv libI66.a $(LIBDIR) 46 @chmod 644 $(LIBDIR)/libI66.a 47 48backspace.o: fio.h backspace.c 49dfe.o: fio.h dfe.c 50due.o: fio.h due.c 51iio.o: fio.h lio.h iio.c 52inquire.o: fio.h inquire.c 53rewind.o: fio.h rewind.c 54rdfmt.o: fio.h format.h rdfmt.c 55sue.o: fio.h sue.c 56douio.o: fio.h douio.c 57sfe.o: fio.h sfe.c 58fmt.o: fio.h format.h fmt.c 59dofio.o: fio.h format.h dofio.c 60lwrite.o: fio.h lio.h lwrite.c 61lread.o: fio.h lio.h lread.c 62dolio.o: fio.h lio.h dolio.c 63open.o: fio.h open.c 64close.o: fio.h close.c 65util.o: fio.h util.c 66endfile.o: fio.h endfile.c 67wrtfmt.o: fio.h format.h wrtfmt.c 68err.o: fiodefs.h err.c 69fmtlib.o: fio.h fmtlib.c 70#fio.h: fiodefs.h 71#fiodefs.h: f_errno.h 72 73# compile, then strip unnecessary symbols 74.c.o: 75 cc $(CFLAGS) -c $*.c 76 -ld -r -x $*.o 77 mv a.out $*.o 78 79f_errlist.o: f_errlist.c 80 cc $(CFLAGS) -c f_errlist.c 81 82Version: $(SOURCES) mkvers 83 @rm -f Version.c 84 ./mkvers $(LIB) $(SOURCES) > Version.c 85 cc -c Version.c 86 mv Version.o Version 87 88mkvers: mkvers.c 89 @cc mkvers.c -o mkvers 90 91clean: 92 rm -f *.o $(LIB) libI66.a tags 93 94index: $(SOURCES) mkindx 95 @./mkindx "f77 libI77.a Source Listing " Makefile $(SOURCES) 96 97print: index 98 @pr index Makefile `ls $(SOURCES)` | $(LPR) 99 100mkindx: mkindx.c 101 @cc mkindx.c -o mkindx 102 103Intro: Intro.tx 104 @-rm Intro 105 @nroff -ms Intro.tx > Intro 106 107wup: Intro.tx 108 @nroff -ms Intro.tx | ul | more 109 110order: 111 @rm -f order 112 @lorder $(OBJECTS) | tsort >order 113 114tags: $(SOURCES) 115 @ctags $(SOURCES) 116 117libI66.a: yes_66.o 118 @rm -f libI66.a 119 @cp yes_66.o libI66.a 120 121# End of Makefile 122# Below this line is nor normally distributed ... 123 124Makefile: makefile 125 @sed -n -e "1,/End of Makefile/p" makefile > Makefile 126 127tape: Makefile 128 @tar cbf 20 $(TAPE) mkvers.c mkindx.c \ 129 Makefile READ_ME NEWS Intro.tx Intro $(SOURCES) 130 131 132# below here is SCCS stuff ... 133 134backspace.c: s.backspace.c 135 @rm -f backspace.c 136 get s.backspace.c 137close.c: s.close.c 138 @rm -f close.c 139 get s.close.c 140dfe.c: s.dfe.c 141 @rm -f dfe.c 142 get s.dfe.c 143due.c: s.due.c 144 @rm -f due.c 145 get s.due.c 146endfile.c: s.endfile.c 147 @rm -f endfile.c 148 get s.endfile.c 149err.c: s.err.c 150 @rm -f err.c 151 get s.err.c 152fmt.c: s.fmt.c 153 @rm -f fmt.c 154 get s.fmt.c 155fmtlib.c: s.fmtlib.c 156 @rm -f fmtlib.c 157 get s.fmtlib.c 158iio.c: s.iio.c 159 @rm -f iio.c 160 get s.iio.c 161inquire.c: s.inquire.c 162 @rm -f inquire.c 163 get s.inquire.c 164lwrite.c: s.lwrite.c 165 @rm -f lwrite.c 166 get s.lwrite.c 167lread.c: s.lread.c 168 @rm -f lread.c 169 get s.lread.c 170dolio.c: s.dolio.c 171 @rm -f dolio.c 172 get s.dolio.c 173open.c: s.open.c 174 @rm -f open.c 175 get s.open.c 176rdfmt.c: s.rdfmt.c 177 @rm -f rdfmt.c 178 get s.rdfmt.c 179rewind.c: s.rewind.c 180 @rm -f rewind.c 181 get s.rewind.c 182sfe.c: s.sfe.c 183 @rm -f sfe.c 184 get s.sfe.c 185sue.c: s.sue.c 186 @rm -f sue.c 187 get s.sue.c 188douio.c: s.douio.c 189 @rm -f douio.c 190 get s.douio.c 191util.c: s.util.c 192 @rm -f util.c 193 get s.util.c 194wrtfmt.c: s.wrtfmt.c 195 @rm -f wrtfmt.c 196 get s.wrtfmt.c 197dofio.c: s.dofio.c 198 @rm -f dofio.c 199 get s.dofio.c 200f_errlist.c: s.f_errlist.c 201 @rm -f f_errlist.c 202 get s.f_errlist.c 203yes_66.c: s.yes_66.c 204 @rm -f yes_66.c 205 get s.yes_66.c 206no_66.c: s.no_66.c 207 @rm -f no_66.c 208 get s.no_66.c 209f_errno.h: s.f_errno.h 210 @rm -f f_errno.h 211 get s.f_errno.h 212fiodefs.h: s.fiodefs.h 213 @rm -f fiodefs.h 214 get s.fiodefs.h 215fio.h: s.fio.h 216 @rm -f fio.h 217 get s.fio.h 218format.h: s.format.h 219 @rm -f format.h 220 get s.format.h 221lio.h: s.lio.h 222 @rm -f lio.h 223 get s.lio.h 224