Commit | Line | Data |
---|---|---|
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 | 35 | CFLAGS= -O -D${MACHINE} |
e0085737 | 36 | LIBC= /lib/libc.a |
2927cf78 | 37 | SUBDIR= 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 | 42 | SRCS= 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 | 45 | OBJS= 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 | ||
60 | all: libm.a libm_p.a | |
61 | ||
e0085737 ZAL |
62 | libm.a libm_p.a: ${OBJS} more.${MACHINE} |
63 | cd profiled; ar cru ../libm_p.a ${OBJS} | |
64 | ar cru libm.a ${OBJS} | |
65 | ||
859dc438 | 66 | more.ieee: FRC |
2927cf78 | 67 | for i in common ieee; do (cd $$i; make ${MFLAGS}); done |
e0085737 | 68 | |
859dc438 | 69 | more.national: FRC |
2927cf78 | 70 | for i in common national; do (cd $$i; make ${MFLAGS}); done |
ad8b7426 | 71 | |
859dc438 | 72 | more.tahoe: FRC |
2927cf78 | 73 | for i in common tahoe; do (cd $$i; make ${MFLAGS}); done |
07a355c8 | 74 | |
859dc438 ZAL |
75 | more.vax: FRC |
76 | cd vax; make "CFLAGS=${CFLAGS}" | |
e0085737 ZAL |
77 | |
78 | clean: 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 |
82 | depend: FRC |
83 | mkdep ${CFLAGS} ${SRCS} | |
2927cf78 | 84 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done |
e7e6d508 | 85 | |
e0085737 | 86 | install: 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 |
92 | lint: FRC |
93 | lint ${CFLAGS} ${SRCS} | |
94 | ||
95 | tags: FRC | |
96 | ctags ${SRCS} | |
2927cf78 | 97 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} tags); done |
e0085737 ZAL |
98 | |
99 | FRC: | |
100 | ||
101 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
102 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
103 | ||
104 | acosh.o: acosh.c | |
105 | asincos.o: asincos.c | |
106 | asinh.o: asinh.c | |
107 | atan.o: atan.c | |
2927cf78 | 108 | atanh.o: atanh.c /usr/include/errno.h |
e0085737 ZAL |
109 | cosh.o: cosh.c |
110 | erf.o: erf.c | |
111 | exp.o: exp.c | |
112 | exp__E.o: exp__E.c | |
113 | expm1.o: expm1.c | |
114 | floor.o: floor.c | |
2927cf78 KB |
115 | lgamma.o: lgamma.c /usr/include/math.h /usr/include/errno.h |
116 | j0.o: j0.c /usr/include/math.h /usr/include/errno.h | |
117 | j1.o: j1.c /usr/include/math.h /usr/include/errno.h | |
118 | jn.o: jn.c /usr/include/math.h /usr/include/errno.h | |
119 | log.o: log.c /usr/include/errno.h | |
e0085737 | 120 | log10.o: log10.c |
2927cf78 | 121 | log1p.o: log1p.c /usr/include/errno.h |
e0085737 | 122 | log__L.o: log__L.c |
2927cf78 | 123 | pow.o: pow.c /usr/include/errno.h |
e0085737 ZAL |
124 | sinh.o: sinh.c |
125 | tanh.o: tanh.c | |
e7e6d508 | 126 | |
e0085737 | 127 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |