patch f77_abort(), delete no_lg.c for better way to detect -lg.
[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#
65d3cd9a 6# @(#)Makefile 5.3 (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 \
25 lio.h
26
27LIBRARY = libI77.a
28
29LIBRARY_P = libI77_p.a
30
31MAKEFILE = Makefile
32
33OBJS = backspace.o \
553ac84e
DL
34 c_dfe.o \
35 c_iio.o \
36 c_sfe.o \
1e83e228 37 close.o \
1e83e228
RC
38 dofio.o \
39 dolio.o \
40 douio.o \
41 due.o \
42 endfile.o \
43 err.o \
387fb5ba 44 f77_abort.o \
1e83e228
RC
45 f_errlist.o \
46 fmt.o \
47 fmtlib.o \
1e83e228
RC
48 inquire.o \
49 lread.o \
50 lwrite.o \
51 open.o \
553ac84e 52 rdfe.o \
1e83e228
RC
53 rdfmt.o \
54 rewind.o \
553ac84e
DL
55 rfi.o \
56 rsfe.o \
57 rsli.o \
1e83e228
RC
58 sue.o \
59 util.o \
553ac84e
DL
60 wdfe.o \
61 wfi.o \
62 wrtfmt.o \
63 wsfe.o \
64 wsli.o
1e83e228
RC
65
66OLDDIR = $(DESTDIR)/usr/old/lib
67
68PRINT = pr
69
70SRCS = backspace.c \
553ac84e
DL
71 c_dfe.c \
72 c_iio.c \
73 c_sfe.c \
1e83e228 74 close.c \
1e83e228
RC
75 dofio.c \
76 dolio.c \
77 douio.c \
78 due.c \
79 endfile.c \
80 err.c \
387fb5ba 81 f77_abort.c \
1e83e228
RC
82 f_errlist.c \
83 fmt.c \
84 fmtlib.c \
1e83e228
RC
85 inquire.c \
86 lread.c \
87 lwrite.c \
88 open.c \
553ac84e 89 rdfe.c \
1e83e228
RC
90 rdfmt.c \
91 rewind.c \
553ac84e
DL
92 rfi.c \
93 rsfe.c \
94 rsli.c \
1e83e228
RC
95 sue.c \
96 util.c \
553ac84e
DL
97 wdfe.c \
98 wfi.c \
99 wrtfmt.c \
100 wsfe.c \
101 wsli.c
1e83e228
RC
102
103all: $(LIBRARY) $(LIBRARY_P) libI66.o
104
105$(LIBRARY): $(OBJS) Version
106 @echo -n "Loading $(LIBRARY) ... "
107 @ar cru $(LIBRARY) $(OBJS) Version
108 @ranlib $(LIBRARY)
109 @echo "done"
110
111$(LIBRARY_P): $(OBJS) Version
112 @echo -n "Loading $(LIBRARY_P) ... "
113 @cd profiled; ar cru ../$(LIBRARY_P) $(OBJS) Version
114 @ranlib $(LIBRARY_P)
115 @echo "done"
116
117Version: $(SRCS) mkvers
118 @rm -f Version.c
119 ./mkvers $(LIBRARY) $(SRCS) > Version.c
120 $(CC) -c Version.c
121 mv Version.o Version
122 @rm -f profiled/Version
123 ln Version profiled/Version
124
125mkvers: mkvers.c
126 @$(CC) mkvers.c -o mkvers
127
128clean:; @rm -f $(OBJS) profiled/*.o $(LIBRARY) $(LIBRARY_P)
129
130depend:; @echo Construct dependencies manually
131
132extract:; @ar xo $(DEST)/$(LIBRARY); rm -f __.SYMDEF
133 @cd profiled; -ar xo $(DEST)/$(LIBRARY_P); rm -f __.SYMDEF
134
135index:; @ctags -wx $(HDRS) $(SRCS)
136
137install: $(LIBRARY) $(LIBRARY_P) libI66.o
138 install -m 644 $(LIBRARY) $(DEST)/$(LIBRARY)
139 ranlib $(DEST)/$(LIBRARY)
140 install -m 644 $(LIBRARY_P) $(DEST)/$(LIBRARY_P)
141 ranlib $(DEST)/$(LIBRARY_P)
142 install -m 644 -c libI66.o $(DEST)/libI66.a
143
144library: $(LIBRARY) $(LIBRARY_P)
145
146print:; @$(PRINT) $(HDRS) $(SRCS)
147
148tags: $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
149
150update: $(DEST)/$(LIBRARY)
151
152$(DEST)/$(LIBRARY): $(SRCS) $(HDRS) $(EXTHDRS)
153 @-ar xo $(DEST)/$(LIBRARY)
154 @cd profiled; -ar xo $(DEST)/$(LIBRARY_P)
155 @make -f $(MAKEFILE) DEST=$(DEST) install clean
156
157f_errlist.o: f_errlist.c
158 $(CC) $(CFLAGS) -c f_errlist.c
159 @rm -f profiled/f_errlist.o
160 ln f_errlist.o profiled/f_errlist.o
161.c.o:
162 $(CC) -p $(CFLAGS) -c $*.c
163 -ld -x -r $*.o
164 mv a.out profiled/$*.o
165 $(CC) $(CFLAGS) -c $*.c
166 -ld -x -r $*.o
167 mv a.out $*.o
168
7029897d 169backspace.o: fio.h f_errno.h fiodefs.h backspace.c
553ac84e
DL
170c_dfe.o: fio.h f_errno.h fiodefs.h c_dfe.c
171rdfe.o: fio.h f_errno.h fiodefs.h rdfe.c
172wdfe.o: fio.h f_errno.h fiodefs.h wdfe.c
7029897d 173due.o: fio.h f_errno.h fiodefs.h due.c
553ac84e
DL
174rfi.o: fio.h f_errno.h fiodefs.h rfi.c
175wfi.o: fio.h f_errno.h fiodefs.h wfi.c
176rsli.o: fio.h f_errno.h fiodefs.h lio.h rsli.c
177wsli.o: fio.h f_errno.h fiodefs.h lio.h wsli.c
178c_iio.o: fio.h f_errno.h fiodefs.h lio.h c_iio.c
7029897d
DL
179inquire.o: fio.h f_errno.h fiodefs.h inquire.c
180rewind.o: fio.h f_errno.h fiodefs.h rewind.c
181rdfmt.o: fio.h f_errno.h fiodefs.h format.h rdfmt.c
182sue.o: fio.h f_errno.h fiodefs.h sue.c
183douio.o: fio.h f_errno.h fiodefs.h douio.c
553ac84e
DL
184rsfe.o: fio.h f_errno.h fiodefs.h rsfe.c
185wsfe.o: fio.h f_errno.h fiodefs.h wsfe.c
186c_sfe.o: fio.h f_errno.h fiodefs.h c_sfe.c
7029897d
DL
187fmt.o: fio.h f_errno.h fiodefs.h format.h fmt.c
188dofio.o: fio.h f_errno.h fiodefs.h format.h dofio.c
189lwrite.o: fio.h f_errno.h fiodefs.h lio.h lwrite.c
190lread.o: fio.h f_errno.h fiodefs.h lio.h lread.c
191dolio.o: fio.h f_errno.h fiodefs.h lio.h dolio.c
192open.o: fio.h f_errno.h fiodefs.h open.c
193close.o: fio.h f_errno.h fiodefs.h close.c
194util.o: fio.h f_errno.h fiodefs.h util.c
195endfile.o: fio.h f_errno.h fiodefs.h endfile.c
196wrtfmt.o: fio.h f_errno.h fiodefs.h format.h wrtfmt.c
553ac84e 197err.o: fio.h f_errno.h fiodefs.h err.c
7029897d 198fmtlib.o: fio.h f_errno.h fiodefs.h fmtlib.c
387fb5ba 199f77_abort.o: fio.h f_errno.h fiodefs.h f77_abort.c