sockaddr's now require length (K. Sklower);
[unix-history] / usr / src / lib / libm / Makefile
CommitLineData
e7e6d508 1#
e0085737 2# Copyright (c) 1987 Regents of the University of California.
2927cf78 3# All rights reserved.
e7e6d508 4#
2927cf78 5# Redistribution and use in source and binary forms are permitted
a399f6c8
KB
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley. The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2927cf78 16#
a399f6c8 17# @(#)Makefile 1.9 (Berkeley) %G%
e7e6d508
ZAL
18#
19# This high quality math library is intended to run on either a VAX in
20# D_floating format or a machine that conforms to the IEEE standard 754
21# for double precision floating-point arithmetic.
22#
23# WARNING: On machines other than the ones mentioned above, run the original
24# Version 7 math library, if nothing better is available.
e7e6d508 25#
e0085737 26# MACHINE indicates the type of floating point hardware you are using; legal
e7e6d508
ZAL
27# values are:
28#
859dc438
ZAL
29# vax - for the VAX D_floating format, the default.
30# tahoe - for the TAHOE double format.
31# national - for those IEEE machines whose floating point implementation
e7e6d508 32# has similar byte ordering as the NATIONAL 32016 with 32081.
859dc438 33# ieee - for other IEEE machines, we hope.
e7e6d508 34#
07a355c8 35CFLAGS= -O -D${MACHINE}
e0085737 36LIBC= /lib/libc.a
2927cf78 37SUBDIR= vax tahoe national common ieee
e7e6d508
ZAL
38#
39# Files comprising the standard Math library;
07a355c8 40# actually there are more under ${MACHINE}/ subdirectory.
e7e6d508 41#
e0085737 42SRCS= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c \
a62df508 43 exp.c exp__E.c expm1.c floor.c lgamma.c j0.c j1.c jn.c \
e7e6d508 44 log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
e0085737 45OBJS= acosh.o asincos.o asinh.o atan.o atanh.o cosh.o erf.o \
a62df508 46 exp.o exp__E.o expm1.o floor.o lgamma.o j0.o j1.o jn.o \
e7e6d508
ZAL
47 log.o log10.o log1p.o log__L.o pow.o sinh.o tanh.o
48
e7e6d508
ZAL
49.c.o:
50#### generate additional code for profiling (-p)
51 ${CC} -p ${CFLAGS} -c $*.c
52#### generate relocation bits (-r) & preserve symbols that begin with L (-X)
53 -ld -X -r $*.o
54 mv a.out profiled/$*.o
55 ${CC} ${CFLAGS} -c $*.c
56#### generate relocation bits (-r) but don't preserve local symbols (-x)
57 -ld -x -r $*.o
58 mv a.out $*.o
59
60all: libm.a libm_p.a
61
e0085737
ZAL
62libm.a libm_p.a: ${OBJS} more.${MACHINE}
63 cd profiled; ar cru ../libm_p.a ${OBJS}
64 ar cru libm.a ${OBJS}
65
859dc438 66more.ieee: FRC
2927cf78 67 for i in common ieee; do (cd $$i; make ${MFLAGS}); done
e0085737 68
859dc438 69more.national: FRC
2927cf78 70 for i in common national; do (cd $$i; make ${MFLAGS}); done
ad8b7426 71
859dc438 72more.tahoe: FRC
2927cf78 73 for i in common tahoe; do (cd $$i; make ${MFLAGS}); done
07a355c8 74
859dc438
ZAL
75more.vax: FRC
76 cd vax; make "CFLAGS=${CFLAGS}"
e0085737
ZAL
77
78clean: FRC
e99ec930 79 rm -f ${OBJS} profiled/*.o core libm.a libm_p.a
2927cf78 80 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
e7e6d508 81
e0085737
ZAL
82depend: FRC
83 mkdep ${CFLAGS} ${SRCS}
2927cf78 84 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done
e7e6d508 85
e0085737 86install: FRC
e0085737 87 install -o bin -g bin -m 644 libm.a ${DESTDIR}/usr/lib/libm.a
e7e6d508 88 ranlib ${DESTDIR}/usr/lib/libm.a
e0085737 89 install -o bin -g bin -m 644 libm_p.a ${DESTDIR}/usr/lib/libm_p.a
e7e6d508
ZAL
90 ranlib ${DESTDIR}/usr/lib/libm_p.a
91
e0085737
ZAL
92lint: FRC
93 lint ${CFLAGS} ${SRCS}
94
95tags: FRC
96 ctags ${SRCS}
2927cf78 97 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} tags); done
e0085737
ZAL
98
99FRC:
100
101# DO NOT DELETE THIS LINE -- mkdep uses it.
102# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
103
104acosh.o: acosh.c
105asincos.o: asincos.c
106asinh.o: asinh.c
107atan.o: atan.c
2927cf78 108atanh.o: atanh.c /usr/include/errno.h
e0085737
ZAL
109cosh.o: cosh.c
110erf.o: erf.c
111exp.o: exp.c
112exp__E.o: exp__E.c
113expm1.o: expm1.c
114floor.o: floor.c
2927cf78
KB
115lgamma.o: lgamma.c /usr/include/math.h /usr/include/errno.h
116j0.o: j0.c /usr/include/math.h /usr/include/errno.h
117j1.o: j1.c /usr/include/math.h /usr/include/errno.h
118jn.o: jn.c /usr/include/math.h /usr/include/errno.h
119log.o: log.c /usr/include/errno.h
e0085737 120log10.o: log10.c
2927cf78 121log1p.o: log1p.c /usr/include/errno.h
e0085737 122log__L.o: log__L.c
2927cf78 123pow.o: pow.c /usr/include/errno.h
e0085737
ZAL
124sinh.o: sinh.c
125tanh.o: tanh.c
e7e6d508 126
e0085737 127# IF YOU PUT ANYTHING HERE IT WILL GO AWAY