xref: /original-bsd/lib/libm/national/Makefile (revision abd50c55)
1#
2# Copyright (c) 1987 Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
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.
16#
17#	@(#)Makefile	5.4 (Berkeley) 04/03/89
18#
19CFLAGS=	-O -I..
20SRCS=	cabs.c cbrt.c
21OBJS=	cabs.o cbrt.o sqrt.o support.o
22
23.c.o:
24	${CC} -p ${CFLAGS} -c $*.c
25	-ld -X -r $*.o
26	mv a.out ../profiled/$*.o
27	${CC} ${CFLAGS} -c $*.c
28	-ld -x -r $*.o
29	mv a.out $*.o
30
31.s.o:
32####	insert additional code for profiling
33	sed -f mcount.sed $*.s | ${AS} -o $*.o
34	-ld -X -r $*.o
35	mv a.out ../profiled/$*.o
36	${AS} -o $*.o $*.s
37	-ld -x -r $*.o
38	mv a.out $*.o
39
40all: ../libm.a ../libm_p.a
41
42../libm.a ../libm_p.a: ${OBJS} FRC
43	cd ../profiled; ar cru ../libm_p.a ${OBJS}
44	ar cru ../libm.a ${OBJS}
45
46depend: FRC
47	mkdep ${CFLAGS} ${SRCS}
48
49tags: FRC
50	ctags ${SRCS}
51
52clean: FRC
53	rm -f ${OBJS} a.out
54
55FRC:
56
57# DO NOT DELETE THIS LINE -- mkdep uses it.
58# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
59
60cabs.o: cabs.c
61cbrt.o: cbrt.c
62
63# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
64