Commit | Line | Data |
---|---|---|
e0085737 ZAL |
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) 7/6/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 | # | |
23 | CFLAGS= -O | |
24 | LIBC= /lib/libc.a | |
25 | # | |
26 | # Files comprising the standard Math library; | |
27 | # actually there are more under ${MACH}/ subdirectory. | |
28 | # | |
29 | SRCS= 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 | |
32 | OBJS= 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 | |
e69bc8c4 ZAL |
35 | |
36 | .c.o: | |
e0085737 | 37 | #### generate additional code for profiling (-p) |
e69bc8c4 | 38 | ${CC} -p ${CFLAGS} -c $*.c |
e0085737 | 39 | #### generate relocation bits (-r) & preserve symbols that begin with L (-X) |
e69bc8c4 | 40 | -ld -X -r $*.o |
e0085737 | 41 | mv a.out profiled/$*.o |
e69bc8c4 | 42 | ${CC} ${CFLAGS} -c $*.c |
e0085737 | 43 | #### generate relocation bits (-r) but don't preserve local symbols (-x) |
e69bc8c4 ZAL |
44 | -ld -x -r $*.o |
45 | mv a.out $*.o | |
46 | ||
e0085737 | 47 | all: libm.a libm_p.a |
e69bc8c4 | 48 | |
e0085737 ZAL |
49 | libm.a libm_p.a: ${OBJS} more.${MACHINE} |
50 | cd profiled; ar cru ../libm_p.a ${OBJS} | |
51 | ar cru libm.a ${OBJS} | |
52 | ||
53 | more.vax: FRC | |
54 | cd VAX; make "CFLAGS=${CFLAGS} -DVAX" | |
55 | ||
56 | more.tahoe: FRC | |
57 | cd IEEE; make "CFLAGS=${CFLAGS} -DTAHOE" | |
58 | ||
59 | clean: FRC | |
60 | rm -f ${OBJS} core libnm.a libnm_p.a IEEE/*.o VAX/*.o profiled/*.o | |
61 | ||
62 | depend: FRC | |
63 | mkdep ${CFLAGS} ${SRCS} | |
64 | ||
65 | install: 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 | ||
74 | lint: FRC | |
75 | lint ${CFLAGS} ${SRCS} | |
76 | ||
77 | tags: FRC | |
78 | ctags ${SRCS} | |
79 | ||
80 | FRC: | |
81 | ||
82 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
83 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
84 | ||
85 | acosh.o: acosh.c | |
86 | asincos.o: asincos.c | |
87 | asinh.o: asinh.c | |
88 | atan.o: atan.c | |
89 | atanh.o: atanh.c | |
90 | cosh.o: cosh.c | |
91 | erf.o: erf.c | |
92 | exp.o: exp.c | |
93 | exp__E.o: exp__E.c | |
94 | expm1.o: expm1.c | |
95 | floor.o: floor.c | |
96 | lgamma.o: lgamma.c /usr/include/math.h | |
97 | j0.o: j0.c /usr/include/math.h | |
98 | j1.o: j1.c /usr/include/math.h | |
99 | jn.o: jn.c /usr/include/math.h | |
100 | log.o: log.c | |
101 | log10.o: log10.c | |
102 | log1p.o: log1p.c | |
103 | log__L.o: log__L.c | |
104 | pow.o: pow.c | |
105 | sinh.o: sinh.c | |
106 | tanh.o: tanh.c | |
107 | ||
108 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |