xref: /original-bsd/old/libm/libom/Makefile (revision 2301fdfb)
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.5	(Berkeley)	12/12/87
7#
8CFLAGS=	-O
9LIBC=	/lib/libc.a
10SRCS=	asin.c atan.c hypot.c jn.c j0.c j1.c pow.c gamma.c \
11	log.c sin.c sqrt.c tan.c tanh.c sinh.c erf.c exp.c floor.c
12OBJS=	asin.o atan.o hypot.o jn.o j0.o j1.o pow.o gamma.o \
13	log.o sin.o sqrt.o tan.o tanh.o sinh.o erf.o exp.o floor.o
14
15.c.o:
16	${CC} -p ${CFLAGS} -c $*.c
17	-ld -X -r $*.o
18	mv a.out profiled/$*.o
19	${CC} ${CFLAGS} -c $*.c
20	-ld -x -r $*.o
21	mv a.out $*.o
22
23all: libom.a libom_p.a
24
25libom.a libom_p.a: ${OBJS}
26	cd profiled; ar cru ../libom_p.a ${OBJS}
27	ar cru libom.a ${OBJS}
28
29clean: FRC
30	rm -f ${OBJS} core libom.a libom_p.a profiled/*
31
32depend: FRC
33	mkdep ${CFLAGS} ${SRCS}
34
35install: FRC
36	rm -f ${DESTDIR}/usr/lib/libnm.a ${DESTDIR}/usr/lib/libnm_p.a
37	install -o bin -g bin -m 644 libom.a ${DESTDIR}/usr/lib/libom.a
38	ln ${DESTDIR}/usr/lib/libom.a ${DESTDIR}/usr/lib/libnm.a
39	ranlib ${DESTDIR}/usr/lib/libom.a
40	install -o bin -g bin -m 644 libom_p.a ${DESTDIR}/usr/lib/libom_p.a
41	ln ${DESTDIR}/usr/lib/libom_p.a ${DESTDIR}/usr/lib/libnm_p.a
42	ranlib ${DESTDIR}/usr/lib/libom_p.a
43
44lint: FRC
45	lint ${CFLAGS} ${SRCS}
46
47tags: FRC
48	ctags ${SRCS}
49
50FRC:
51
52# DO NOT DELETE THIS LINE -- mkdep uses it.
53# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
54
55asin.o: asin.c /usr/include/errno.h
56atan.o: atan.c
57hypot.o: hypot.c
58jn.o: jn.c /usr/include/math.h /usr/include/errno.h
59j0.o: j0.c /usr/include/math.h /usr/include/errno.h
60j1.o: j1.c /usr/include/math.h /usr/include/errno.h
61pow.o: pow.c /usr/include/errno.h
62gamma.o: gamma.c /usr/include/errno.h /usr/include/math.h
63log.o: log.c /usr/include/errno.h /usr/include/math.h
64sin.o: sin.c
65sqrt.o: sqrt.c /usr/include/errno.h
66tan.o: tan.c /usr/include/errno.h /usr/include/math.h
67tanh.o: tanh.c
68sinh.o: sinh.c
69erf.o: erf.c
70exp.o: exp.c /usr/include/errno.h /usr/include/math.h
71floor.o: floor.c
72
73# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
74