implement namelist
[unix-history] / usr / src / usr.bin / f77 / libI77 / Makefile
CommitLineData
1e83e228 1#
161423a6
RE
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
60fce068 6# @(#)Makefile 5.4 (Berkeley) %G%
161423a6
RE
7#
8
9# Makefile for f77 I/O lib, libI77.a
1e83e228
RC
10
11CFLAGS = -O
12
13DEST = $(DESTDIR)/usr/lib
14
15DESTDIR =
16
17EXTHDRS =
18
19FFLAGS = -O
20
21HDRS = f_errno.h \
22 fio.h \
23 fiodefs.h \
24 format.h \
60fce068
JB
25 lio.h \
26 nmlio.h
1e83e228
RC
27
28LIBRARY = libI77.a
29
30LIBRARY_P = libI77_p.a
31
32MAKEFILE = Makefile
33
34OBJS = backspace.o \
553ac84e
DL
35 c_dfe.o \
36 c_iio.o \
37 c_sfe.o \
1e83e228 38 close.o \
1e83e228
RC
39 dofio.o \
40 dolio.o \
41 douio.o \
42 due.o \
43 endfile.o \
44 err.o \
387fb5ba 45 f77_abort.o \
1e83e228
RC
46 f_errlist.o \
47 fmt.o \
48 fmtlib.o \
1e83e228
RC
49 inquire.o \
50 lread.o \
51 lwrite.o \
52 open.o \
553ac84e 53 rdfe.o \
1e83e228
RC
54 rdfmt.o \
55 rewind.o \
553ac84e
DL
56 rfi.o \
57 rsfe.o \
58 rsli.o \
60fce068 59 rsnmle.o \
1e83e228
RC
60 sue.o \
61 util.o \
553ac84e
DL
62 wdfe.o \
63 wfi.o \
64 wrtfmt.o \
65 wsfe.o \
60fce068
JB
66 wsli.o \
67 wsnmle.o
1e83e228
RC
68
69OLDDIR = $(DESTDIR)/usr/old/lib
70
71PRINT = pr
72
73SRCS = backspace.c \
553ac84e
DL
74 c_dfe.c \
75 c_iio.c \
76 c_sfe.c \
1e83e228 77 close.c \
1e83e228
RC
78 dofio.c \
79 dolio.c \
80 douio.c \
81 due.c \
82 endfile.c \
83 err.c \
387fb5ba 84 f77_abort.c \
1e83e228
RC
85 f_errlist.c \
86 fmt.c \
87 fmtlib.c \
1e83e228
RC
88 inquire.c \
89 lread.c \
90 lwrite.c \
91 open.c \
553ac84e 92 rdfe.c \
1e83e228
RC
93 rdfmt.c \
94 rewind.c \
553ac84e
DL
95 rfi.c \
96 rsfe.c \
97 rsli.c \
60fce068 98 rsnmle.c \
1e83e228
RC
99 sue.c \
100 util.c \
553ac84e
DL
101 wdfe.c \
102 wfi.c \
103 wrtfmt.c \
104 wsfe.c \
60fce068
JB
105 wsli.c \
106 wsnmle.c
1e83e228
RC
107
108all: $(LIBRARY) $(LIBRARY_P) libI66.o
109
110$(LIBRARY): $(OBJS) Version
111 @echo -n "Loading $(LIBRARY) ... "
112 @ar cru $(LIBRARY) $(OBJS) Version
113 @ranlib $(LIBRARY)
114 @echo "done"
115
116$(LIBRARY_P): $(OBJS) Version
117 @echo -n "Loading $(LIBRARY_P) ... "
118 @cd profiled; ar cru ../$(LIBRARY_P) $(OBJS) Version
119 @ranlib $(LIBRARY_P)
120 @echo "done"
121
122Version: $(SRCS) mkvers
123 @rm -f Version.c
124 ./mkvers $(LIBRARY) $(SRCS) > Version.c
125 $(CC) -c Version.c
126 mv Version.o Version
127 @rm -f profiled/Version
128 ln Version profiled/Version
129
130mkvers: mkvers.c
131 @$(CC) mkvers.c -o mkvers
132
133clean:; @rm -f $(OBJS) profiled/*.o $(LIBRARY) $(LIBRARY_P)
134
135depend:; @echo Construct dependencies manually
136
137extract:; @ar xo $(DEST)/$(LIBRARY); rm -f __.SYMDEF
138 @cd profiled; -ar xo $(DEST)/$(LIBRARY_P); rm -f __.SYMDEF
139
140index:; @ctags -wx $(HDRS) $(SRCS)
141
142install: $(LIBRARY) $(LIBRARY_P) libI66.o
143 install -m 644 $(LIBRARY) $(DEST)/$(LIBRARY)
144 ranlib $(DEST)/$(LIBRARY)
145 install -m 644 $(LIBRARY_P) $(DEST)/$(LIBRARY_P)
146 ranlib $(DEST)/$(LIBRARY_P)
147 install -m 644 -c libI66.o $(DEST)/libI66.a
148
149library: $(LIBRARY) $(LIBRARY_P)
150
151print:; @$(PRINT) $(HDRS) $(SRCS)
152
153tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
154
155update: $(DEST)/$(LIBRARY)
156
157$(DEST)/$(LIBRARY): $(SRCS) $(HDRS) $(EXTHDRS)
158 @-ar xo $(DEST)/$(LIBRARY)
159 @cd profiled; -ar xo $(DEST)/$(LIBRARY_P)
160 @make -f $(MAKEFILE) DEST=$(DEST) install clean
161
162f_errlist.o: f_errlist.c
163 $(CC) $(CFLAGS) -c f_errlist.c
164 @rm -f profiled/f_errlist.o
165 ln f_errlist.o profiled/f_errlist.o
166.c.o:
167 $(CC) -p $(CFLAGS) -c $*.c
168 -ld -x -r $*.o
169 mv a.out profiled/$*.o
170 $(CC) $(CFLAGS) -c $*.c
171 -ld -x -r $*.o
172 mv a.out $*.o
173
7029897d 174backspace.o: fio.h f_errno.h fiodefs.h backspace.c
553ac84e
DL
175c_dfe.o: fio.h f_errno.h fiodefs.h c_dfe.c
176rdfe.o: fio.h f_errno.h fiodefs.h rdfe.c
177wdfe.o: fio.h f_errno.h fiodefs.h wdfe.c
7029897d 178due.o: fio.h f_errno.h fiodefs.h due.c
553ac84e
DL
179rfi.o: fio.h f_errno.h fiodefs.h rfi.c
180wfi.o: fio.h f_errno.h fiodefs.h wfi.c
181rsli.o: fio.h f_errno.h fiodefs.h lio.h rsli.c
182wsli.o: fio.h f_errno.h fiodefs.h lio.h wsli.c
183c_iio.o: fio.h f_errno.h fiodefs.h lio.h c_iio.c
7029897d
DL
184inquire.o: fio.h f_errno.h fiodefs.h inquire.c
185rewind.o: fio.h f_errno.h fiodefs.h rewind.c
186rdfmt.o: fio.h f_errno.h fiodefs.h format.h rdfmt.c
187sue.o: fio.h f_errno.h fiodefs.h sue.c
188douio.o: fio.h f_errno.h fiodefs.h douio.c
553ac84e
DL
189rsfe.o: fio.h f_errno.h fiodefs.h rsfe.c
190wsfe.o: fio.h f_errno.h fiodefs.h wsfe.c
191c_sfe.o: fio.h f_errno.h fiodefs.h c_sfe.c
7029897d
DL
192fmt.o: fio.h f_errno.h fiodefs.h format.h fmt.c
193dofio.o: fio.h f_errno.h fiodefs.h format.h dofio.c
194lwrite.o: fio.h f_errno.h fiodefs.h lio.h lwrite.c
195lread.o: fio.h f_errno.h fiodefs.h lio.h lread.c
196dolio.o: fio.h f_errno.h fiodefs.h lio.h dolio.c
197open.o: fio.h f_errno.h fiodefs.h open.c
198close.o: fio.h f_errno.h fiodefs.h close.c
199util.o: fio.h f_errno.h fiodefs.h util.c
200endfile.o: fio.h f_errno.h fiodefs.h endfile.c
201wrtfmt.o: fio.h f_errno.h fiodefs.h format.h wrtfmt.c
553ac84e 202err.o: fio.h f_errno.h fiodefs.h err.c
7029897d 203fmtlib.o: fio.h f_errno.h fiodefs.h fmtlib.c
387fb5ba 204f77_abort.o: fio.h f_errno.h fiodefs.h f77_abort.c
60fce068
JB
205rsnmle.o: fio.h f_errno.h fiodefs.h lio.h nmlio.h rsnmle.c
206wsnmle.o: fio.h f_errno.h fiodefs.h lio.h nmlio.h wsnmle.c