1# 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# 6# @(#)Makefile 5.8 (Berkeley) 05/10/89 7# 8# Makefile for f77 math & startup lib, libF77.a 9 10CFLAGS= -O 11FFLAGS= -O 12DEST= ${DESTDIR}/usr/lib 13LIBRARY=libF77.a 14LIBRARY_P=libF77_p.a 15OPTIONS=-DUCBVAX 16OBJS= abort_.o besj0_.o besj1_.o besjn_.o besy0_.o besy1_.o besyn_.o \ 17 c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o d_abs.o \ 18 d_acos.o d_asin.o d_atan.o d_atn2.o d_cnjg.o d_cos.o d_cosh.o \ 19 d_dim.o d_dprod.o d_exp.o d_imag.o d_int.o d_lg10.o d_log.o \ 20 d_mod.o d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o d_tan.o \ 21 d_tanh.o dbesj0_.o dbesj1_.o dbesjn_.o dbesy0_.o dbesy1_.o \ 22 dbesyn_.o derf_.o derfc_.o ef1asc_.o ef1cmc_.o erf_.o erfc_.o \ 23 exit_.o h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o \ 24 h_sign.o hl_ge.o hl_gt.o hl_le.o hl_lt.o i_abs.o i_dim.o i_dnnt.o \ 25 i_indx.o i_len.o i_mod.o i_nint.o i_sign.o l_ge.o l_gt.o l_le.o \ 26 l_lt.o lnblnk_.o long_.o main.o pow_ci.o pow_dd.o pow_di.o pow_hh.o \ 27 pow_ii.o pow_ri.o pow_zi.o pow_zz.o r_abs.o r_acos.o r_asin.o \ 28 r_atan.o r_atn2.o r_cnjg.o r_cos.o r_cosh.o r_dim.o r_exp.o \ 29 r_imag.o r_int.o r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o r_sin.o \ 30 r_sinh.o r_sqrt.o r_tan.o r_tanh.o rand_.o random_.o range.o \ 31 rindex_.o s_cat.o s_cmp.o s_copy.o s_paus.o s_rnge.o s_stop.o \ 32 short_.o signal_.o subout.o traper_.o trapov_.o trpfpe_.o z_cos.o \ 33 z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o 34SRCS= abort_.c besj0_.c besj1_.c besjn_.c besy0_.c besy1_.c besyn_.c \ 35 c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c d_abs.c \ 36 d_acos.c d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c \ 37 d_dim.c d_dprod.c d_exp.c d_imag.c d_int.c d_lg10.c d_log.c \ 38 d_mod.c d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c d_tan.c d_tanh.c \ 39 dbesj0_.c dbesj1_.c dbesjn_.c dbesy0_.c dbesy1_.c dbesyn_.c derf_.c \ 40 derfc_.c ef1asc_.c ef1cmc_.c erf_.c erfc_.c exit_.c h_abs.c \ 41 h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c h_sign.c hl_ge.c \ 42 hl_gt.c hl_le.c hl_lt.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c \ 43 i_mod.c i_nint.c i_sign.c l_ge.c l_gt.c l_le.c l_lt.c lnblnk_.c \ 44 long_.c main.c pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c \ 45 pow_zi.c pow_zz.c r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c \ 46 r_cnjg.c r_cos.c r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c \ 47 r_lg10.c r_log.c r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \ 48 r_tan.c r_tanh.c rand_.c random_.c range.c rindex_.c s_cat.c \ 49 s_cmp.c s_copy.c s_paus.c s_rnge.c s_stop.c short_.c signal_.c \ 50 subout.c traper_.c trapov_.c trpfpe_.c z_cos.c z_div.c z_exp.c \ 51 z_log.c z_sin.c z_sqrt.c 52 53all: Version ${LIBRARY} ${LIBRARY_P} 54 55${LIBRARY}: ${OBJS} 56 @echo "Loading ${LIBRARY} ... " 57 @ar cru ${LIBRARY} ${OBJS) Version 58 ranlib ${LIBRARY} 59 60${LIBRARY_P}: ${OBJS} 61 @echo "Loading ${LIBRARY_P} ... " 62 @cd profiled; ar cru ../${LIBRARY_P} ${OBJS) Version 63 ranlib ${LIBRARY_P} 64 65Version: ${SRCS} mkvers 66 @rm -f Version.c 67 ./mkvers ${LIBRARY} ${SRCS} > Version.c 68 ${CC} -c Version.c 69 mv -f Version.o Version 70 @rm -f profiled/Version 71 ln Version profiled/Version 72 73mkvers: mkvers.c 74 @${CC} mkvers.c -o mkvers 75 76clean: 77 rm -f ${OBJS} Usef profiled/*.o ${LIBRARY} ${LIBRARY_P} Usef mkvers 78 79cleandir: clean 80 rm -f ${MAN} tags .depend 81 82depend: 83 mkdep ${SRCS} 84 85install: ${MAN} 86 install -o bin -g bin -m 644 ${LIBRARY} ${DEST}/${LIBRARY} 87 ranlib -t ${DEST}/${LIBRARY} 88 install -o bin -g bin -m 644 ${LIBRARY_P} ${DEST}/${LIBRARY_P} 89 ranlib -t ${DEST}/${LIBRARY_P} 90 91tags: ${SRCS} 92 ctags ${SRCS} 93 94trapov_.o: trapov_.c 95 ${CC} -S $(OPTIONS) trapov_.c; 96 (echo "g/.set L[0-9][0-9]*,0x0$$/s/0x0/0xf10/"; echo "x") \ 97 | ex - trapov_.s; 98 as trapov_.s -o trapov_.o; 99 mv trapov_.o profiled/trapov_.o 100 rm trapov_.s 101 ${CC} -S $(OPTIONS) trapov_.c 102 (echo "g/.set L[0-9][0-9]*,0x0$$/s/0x0/0xf10/"; echo "x") \ 103 | ex - trapov_.s 104 as trapov_.s -o trapov_.o 105 rm trapov_.s 106 107# 'Usef' is part of a kuldge to get around a bug in the C compiler. 108# C (sec. 9.10 of C ref manual) should round the return value of 109# functions of type float from double to float. It doesn't, so f77 110# truncates it losing a half bit of accuracy. See file Test_float 111# for a test. When it is fixed, get rid of Usef & the extraneous stores 112# in pow_ri, r_dim, r_mod, r_nint . 113 114${OBJS}: Usef 115 116Usef: Usef.c 117 ${CC} -O Usef.c -o Usef 118 119.c.o: 120 @${CC} -p `Usef $*` ${CFLAGS} -c $*.c 121 @-ld -x -r $*.o 122 @mv a.out profiled/$*.o 123 ${CC} `Usef $*` ${CFLAGS} -c $*.c 124 @-ld -x -r $*.o 125 @mv a.out $*.o 126