xref: /original-bsd/usr.bin/f77/libF77/Makefile (revision f72a1a16)
1#	@(#)Makefile	5.13 (Berkeley) 01/17/91
2
3LIB=	F77
4CFLAGS+=-I/sys
5SRCS=	abort_.c besj0_.c besj1_.c besjn_.c besy0_.c besy1_.c besyn_.c \
6	c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c d_abs.c \
7	d_acos.c d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c \
8	d_dim.c d_dprod.c d_exp.c d_imag.c d_int.c d_lg10.c d_log.c \
9	d_mod.c d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c d_tan.c d_tanh.c \
10	dbesj0_.c dbesj1_.c dbesjn_.c dbesy0_.c dbesy1_.c dbesyn_.c derf_.c \
11	derfc_.c ef1asc_.c ef1cmc_.c erf_.c erfc_.c exit_.c h_abs.c \
12	h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c h_sign.c hl_ge.c \
13	hl_gt.c hl_le.c hl_lt.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c \
14	i_mod.c i_nint.c i_sign.c l_ge.c l_gt.c l_le.c l_lt.c lnblnk_.c \
15	long_.c main.c pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c \
16	pow_zi.c pow_zz.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \
17	r_cnjg.c r_cos.c r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c \
18	r_lg10.c r_log.c r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \
19	r_tan.c r_tanh.c rand_.c random_.c range.c rindex_.c s_cat.c \
20	s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c short_.c signal_.c \
21	subout.c traper_.c trapov_.c trpfpe_.c z_cos.c z_div.c z_exp.c \
22	z_log.c z_sin.c z_sqrt.c
23
24LDADD=		Version.o
25CLEANFILES+=	Usef Version.o Version.c mkvers
26
27libF77.a libF77_p.a:: Version.o
28
29Version.o: Version.c
30	${CC} -R -c Version.c
31
32Version.c: mkvers ${SRCS}
33	mkvers libF77.a ${.ALLSRC:M*.c} > ${.TARGET}
34
35mkvers: mkvers.c
36	${CC} ${CFLAGS} ${.CURDIR}/mkvers.c -o ${.TARGET}
37
38Usef: Usef.c
39	${CC} ${CFLAGS} ${.CURDIR}/Usef.c -o ${.TARGET}
40
41trapov_.o trapov_.po: trapov_.c
42	${CC} -S -DUCBVAX ${.CURDIR}/trapov_.c;
43	(echo "g/.set	L[0-9][0-9]*,0x0$$/s/0x0/0xf10/"; echo "x") | \
44	    ex - trapov_.s;
45	${AS} trapov_.s -o ${.TARGET}
46	rm -f trapov_.s
47
48.include <bsd.lib.mk>
49
50# 'Usef' is part of a kuldge to get around a bug in the C compiler.
51# C (sec. 9.10 of C ref manual) should round the return value of functions of
52# type float from double to float.  It doesn't, so f77 truncates it losing a
53# half bit of accuracy.  See file Test_float for a test.  When it is fixed,
54# get rid of Usef & the extraneous stores in pow_ri, r_dim, r_mod, r_nint.
55
56.if (${MACHINE} == "vax" || ${MACHINE} == "tahoe")
57.c.o: Usef
58	${CC} `Usef ${.PREFIX}` ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
59	@${LD} -x -r ${.TARGET}
60	@mv a.out ${.TARGET}
61
62.c.po: Usef
63	${CC} -p `Usef ${.PREFIX}` ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
64	@${LD} -X -r ${.TARGET}
65	@mv a.out ${.TARGET}
66.endif
67