1# 2# Copyright (c) 1987 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 4.12 (Berkeley) 07/06/87 7# 8# This high quality math library is intended to run on either a VAX in 9# D_floating format or a machine that conforms to the IEEE standard 754 10# for double precision floating-point arithmetic. 11# 12# WARNING: On machines other than the ones mentioned above, run the original 13# Version 7 math library, if nothing better is available. 14# 15# MACHINE indicates the type of floating point hardware you are using; legal 16# values are: 17# 18# VAX - for the VAX D_floating format, the default. 19# NATIONAL - for those IEEE machines whose floating point implementation 20# has similar byte ordering as the NATIONAL 32016 with 32081. 21# IEEE - for other IEEE machines, we hope. 22# 23CFLAGS= -O 24LIBC= /lib/libc.a 25# 26# Files comprising the standard Math library; 27# actually there are more under ${MACH}/ subdirectory. 28# 29SRCS= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c \ 30 exp.c exp__E.c expm1.c floor.c lgamma.c j0.c j1.c jn.c \ 31 log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c 32OBJS= acosh.o asincos.o asinh.o atan.o atanh.o cosh.o erf.o \ 33 exp.o exp__E.o expm1.o floor.o lgamma.o j0.o j1.o jn.o \ 34 log.o log10.o log1p.o log__L.o pow.o sinh.o tanh.o 35 36.c.o: 37#### generate additional code for profiling (-p) 38 ${CC} -p ${CFLAGS} -c $*.c 39#### generate relocation bits (-r) & preserve symbols that begin with L (-X) 40 -ld -X -r $*.o 41 mv a.out profiled/$*.o 42 ${CC} ${CFLAGS} -c $*.c 43#### generate relocation bits (-r) but don't preserve local symbols (-x) 44 -ld -x -r $*.o 45 mv a.out $*.o 46 47all: libm.a libm_p.a 48 49libm.a libm_p.a: ${OBJS} more.${MACHINE} 50 cd profiled; ar cru ../libm_p.a ${OBJS} 51 ar cru libm.a ${OBJS} 52 53more.vax: FRC 54 cd VAX; make "CFLAGS=${CFLAGS} -DVAX" 55 56more.tahoe: FRC 57 cd IEEE; make "CFLAGS=${CFLAGS} -DTAHOE" 58 59clean: FRC 60 rm -f ${OBJS} core libnm.a libnm_p.a IEEE/*.o VAX/*.o profiled/*.o 61 62depend: FRC 63 mkdep ${CFLAGS} ${SRCS} 64 65install: FRC 66 -rm -f ${DESTDIR}/usr/lib/libnm.a ${DESTDIR}/usr/lib/libnm_p.a 67 install -o bin -g bin -m 644 libm.a ${DESTDIR}/usr/lib/libm.a 68# ln ${DESTDIR}/usr/lib/libm.a ${DESTDIR}/usr/lib/libnm.a 69 ranlib ${DESTDIR}/usr/lib/libm.a 70 install -o bin -g bin -m 644 libm_p.a ${DESTDIR}/usr/lib/libm_p.a 71# ln ${DESTDIR}/usr/lib/libm_p.a ${DESTDIR}/usr/lib/libnm_p.a 72 ranlib ${DESTDIR}/usr/lib/libm_p.a 73 74lint: FRC 75 lint ${CFLAGS} ${SRCS} 76 77tags: FRC 78 ctags ${SRCS} 79 80FRC: 81 82# DO NOT DELETE THIS LINE -- mkdep uses it. 83# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 84 85acosh.o: acosh.c 86asincos.o: asincos.c 87asinh.o: asinh.c 88atan.o: atan.c 89atanh.o: atanh.c 90cosh.o: cosh.c 91erf.o: erf.c 92exp.o: exp.c 93exp__E.o: exp__E.c 94expm1.o: expm1.c 95floor.o: floor.c 96lgamma.o: lgamma.c /usr/include/math.h 97j0.o: j0.c /usr/include/math.h 98j1.o: j1.c /usr/include/math.h 99jn.o: jn.c /usr/include/math.h 100log.o: log.c 101log10.o: log10.c 102log1p.o: log1p.c 103log__L.o: log__L.c 104pow.o: pow.c 105sinh.o: sinh.c 106tanh.o: tanh.c 107 108# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 109