Commit | Line | Data |
---|---|---|
e7e6d508 | 1 | # |
e0085737 ZAL |
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. | |
e7e6d508 | 5 | # |
e0085737 | 6 | # @(#)Makefile 4.12 (Berkeley) 7/6/87 |
e7e6d508 ZAL |
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. | |
e7e6d508 | 14 | # |
e0085737 | 15 | # MACHINE indicates the type of floating point hardware you are using; legal |
e7e6d508 ZAL |
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 | # | |
e0085737 ZAL |
23 | CFLAGS= -O |
24 | LIBC= /lib/libc.a | |
e7e6d508 ZAL |
25 | # |
26 | # Files comprising the standard Math library; | |
27 | # actually there are more under ${MACH}/ subdirectory. | |
28 | # | |
e0085737 | 29 | SRCS= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c \ |
a62df508 | 30 | exp.c exp__E.c expm1.c floor.c lgamma.c j0.c j1.c jn.c \ |
e7e6d508 | 31 | log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c |
e0085737 | 32 | OBJS= acosh.o asincos.o asinh.o atan.o atanh.o cosh.o erf.o \ |
a62df508 | 33 | exp.o exp__E.o expm1.o floor.o lgamma.o j0.o j1.o jn.o \ |
e7e6d508 ZAL |
34 | log.o log10.o log1p.o log__L.o pow.o sinh.o tanh.o |
35 | ||
e7e6d508 ZAL |
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 | ||
47 | all: libm.a libm_p.a | |
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 | |
e7e6d508 | 61 | |
e0085737 ZAL |
62 | depend: FRC |
63 | mkdep ${CFLAGS} ${SRCS} | |
e7e6d508 | 64 | |
e0085737 | 65 | install: FRC |
e7e6d508 | 66 | -rm -f ${DESTDIR}/usr/lib/libnm.a ${DESTDIR}/usr/lib/libnm_p.a |
e0085737 ZAL |
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 | |
e7e6d508 | 69 | ranlib ${DESTDIR}/usr/lib/libm.a |
e0085737 ZAL |
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 | |
e7e6d508 ZAL |
72 | ranlib ${DESTDIR}/usr/lib/libm_p.a |
73 | ||
e0085737 ZAL |
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 | |
e7e6d508 | 107 | |
e0085737 | 108 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |