Commit | Line | Data |
---|---|---|
c0bc4ef7 | 1 | # |
3e1b82c0 KB |
2 | # Copyright (c) 1987 Regents of the University of California. |
3 | # All rights reserved. | |
c0bc4ef7 | 4 | # |
3e1b82c0 | 5 | # Redistribution and use in source and binary forms are permitted |
2124b336 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. | |
c0bc4ef7 | 16 | # |
2124b336 | 17 | # @(#)Makefile 5.12 (Berkeley) %G% |
3e1b82c0 KB |
18 | # |
19 | CFLAGS= -O | |
20 | LIBC= /lib/libc.a | |
21 | HDRS= gprof.h ${MACHINE}.h | |
22 | SRCS= gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \ | |
23 | printgprof.c printlist.c | |
24 | OBJS= gprof.o arcs.o dfn.o lookup.o ${MACHINE}.o hertz.o \ | |
25 | printgprof.o printlist.o | |
59e77e4f | 26 | |
3e1b82c0 KB |
27 | all: gprof |
28 | ||
29 | gprof: ${OBJS} ${LIBC} | |
30 | ${CC} -o $@ ${CFLAGS} ${OBJS} | |
e00a2fbd | 31 | |
9e8d9019 KM |
32 | gcrt0.h: FRC |
33 | -if [ -r gcrt0.h ] && \ | |
3e1b82c0 KB |
34 | cmp -s gcrt0.h ../../lib/libc/${MACHINE}/csu/gmon.h; then \ |
35 | :; \ | |
9e8d9019 | 36 | else \ |
3e1b82c0 KB |
37 | rm -f gcrt0.h; \ |
38 | cp ../../lib/libc/${MACHINE}/csu/gmon.h gcrt0.h; \ | |
9e8d9019 KM |
39 | fi |
40 | ||
3e1b82c0 KB |
41 | clean: FRC |
42 | rm -f ${OBJS} core gprof | |
43 | ||
44 | depend: FRC | |
45 | mkdep ${CFLAGS} ${SRCS} | |
46 | ||
47 | install: FRC | |
48 | install -s -o bin -g bin -m 755 gprof ${DESTDIR}/usr/ucb/gprof | |
845a5a39 KB |
49 | install -c -o bin -g bin -m 444 gprof.flat ${DESTDIR}/usr/lib |
50 | install -c -o bin -g bin -m 444 gprof.callg ${DESTDIR}/usr/lib | |
3e1b82c0 KB |
51 | |
52 | lint: FRC | |
53 | lint ${CFLAGS} ${SRCS} | |
54 | ||
55 | tags: FRC | |
56 | ctags ${SRCS} | |
57 | ||
9e8d9019 | 58 | FRC: |
9fe8a837 | 59 | |
3e1b82c0 KB |
60 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
61 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
62 | ||
63 | gprof.o: gprof.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h | |
64 | gprof.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h | |
65 | gprof.o: gcrt0.h tahoe.h | |
66 | arcs.o: arcs.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h | |
67 | arcs.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h | |
68 | arcs.o: gcrt0.h tahoe.h | |
69 | dfn.o: dfn.c /usr/include/stdio.h gprof.h /usr/include/stdio.h | |
70 | dfn.o: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/a.out.h | |
71 | dfn.o: /usr/include/sys/exec.h gcrt0.h tahoe.h | |
72 | lookup.o: lookup.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h | |
73 | lookup.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h | |
74 | lookup.o: gcrt0.h tahoe.h | |
75 | tahoe.o: tahoe.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h | |
76 | tahoe.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h | |
77 | tahoe.o: gcrt0.h tahoe.h | |
78 | hertz.o: hertz.c /usr/include/sys/time.h /usr/include/time.h | |
79 | printgprof.o: printgprof.c gprof.h /usr/include/stdio.h | |
80 | printgprof.o: /usr/include/sys/types.h /usr/include/sys/stat.h | |
81 | printgprof.o: /usr/include/a.out.h /usr/include/sys/exec.h gcrt0.h tahoe.h | |
82 | printlist.o: printlist.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h | |
83 | printlist.o: /usr/include/sys/stat.h /usr/include/a.out.h | |
84 | printlist.o: /usr/include/sys/exec.h gcrt0.h tahoe.h | |
85 | ||
86 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |