xref: /original-bsd/usr.bin/gprof/Makefile (revision cc54e209)
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 this notice is preserved and that due credit is given
7# to the University of California at Berkeley. The name of the University
8# may not be used to endorse or promote products derived from this
9# software without specific written prior permission. This software
10# is provided ``as is'' without express or implied warranty.
11#
12#	@(#)Makefile	5.10 (Berkeley) 01/02/88
13#
14CFLAGS=	-O
15LIBC=	/lib/libc.a
16HDRS=	gprof.h ${MACHINE}.h
17SRCS=	gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \
18	printgprof.c printlist.c
19OBJS=	gprof.o arcs.o dfn.o lookup.o ${MACHINE}.o hertz.o \
20	printgprof.o printlist.o
21
22all: gprof
23
24gprof: ${OBJS} ${LIBC}
25	${CC} -o $@ ${CFLAGS} ${OBJS}
26
27gcrt0.h: FRC
28	-if [ -r gcrt0.h ] && \
29		cmp -s gcrt0.h ../../lib/libc/${MACHINE}/csu/gmon.h; then \
30		:; \
31	else \
32		rm -f gcrt0.h; \
33		cp ../../lib/libc/${MACHINE}/csu/gmon.h gcrt0.h; \
34	fi
35
36clean: FRC
37	rm -f ${OBJS} core gprof
38
39depend: FRC
40	mkdep ${CFLAGS} ${SRCS}
41
42install: FRC
43	install -s -o bin -g bin -m 755 gprof ${DESTDIR}/usr/ucb/gprof
44	install -c -o bin -g bin -m 644 gprof.flat ${DESTDIR}/usr/lib
45	install -c -o bin -g bin -m 644 gprof.callg ${DESTDIR}/usr/lib
46
47lint: FRC
48	lint ${CFLAGS} ${SRCS}
49
50tags: FRC
51	ctags ${SRCS}
52
53FRC:
54
55# DO NOT DELETE THIS LINE -- mkdep uses it.
56# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
57
58gprof.o: gprof.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h
59gprof.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h
60gprof.o: gcrt0.h tahoe.h
61arcs.o: arcs.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h
62arcs.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h
63arcs.o: gcrt0.h tahoe.h
64dfn.o: dfn.c /usr/include/stdio.h gprof.h /usr/include/stdio.h
65dfn.o: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/a.out.h
66dfn.o: /usr/include/sys/exec.h gcrt0.h tahoe.h
67lookup.o: lookup.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h
68lookup.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h
69lookup.o: gcrt0.h tahoe.h
70tahoe.o: tahoe.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h
71tahoe.o: /usr/include/sys/stat.h /usr/include/a.out.h /usr/include/sys/exec.h
72tahoe.o: gcrt0.h tahoe.h
73hertz.o: hertz.c /usr/include/sys/time.h /usr/include/time.h
74printgprof.o: printgprof.c gprof.h /usr/include/stdio.h
75printgprof.o: /usr/include/sys/types.h /usr/include/sys/stat.h
76printgprof.o: /usr/include/a.out.h /usr/include/sys/exec.h gcrt0.h tahoe.h
77printlist.o: printlist.c gprof.h /usr/include/stdio.h /usr/include/sys/types.h
78printlist.o: /usr/include/sys/stat.h /usr/include/a.out.h
79printlist.o: /usr/include/sys/exec.h gcrt0.h tahoe.h
80
81# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
82