X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/59e77e4f483386e8fe971059c3871926654079e1..a000ca6dea9aa8a267e20541bd5691462fd8304c:/usr/src/usr.bin/gprof/Makefile diff --git a/usr/src/usr.bin/gprof/Makefile b/usr/src/usr.bin/gprof/Makefile index 4c295ac394..d638c5729e 100644 --- a/usr/src/usr.bin/gprof/Makefile +++ b/usr/src/usr.bin/gprof/Makefile @@ -1,86 +1,61 @@ -SCCSID = @(#)Makefile 1.1 (Berkeley) %G% -RRHBIN = /va/staff/rrh/bin -NCC = ${RRHBIN}/ncc - -CFLAGS = -DDEBUG - -DPROFHDRS = dprof.h -DPROFSRCS = dprof.c arcs.c dfn.c lookup.c printdprof.c -DPROFOBJS = dprof.o arcs.o dfn.o lookup.o printdprof.o -OTHERS = mcrt0.s monitor.h monitor.c monitor.ex - -dprof: $(DPROFOBJS) - cc -o dprof ${CFLAGS} $(DPROFOBJS) - -.c.o: - cc -c ${CFLAGS} $*.c - -mcrt0.o: mcrt0.s - as -o mcrt0.o mcrt0.s - -ld -x -r mcrt0.o - mv a.out mcrt0.o - -monitor.o: monitor.s - as -o monitor.o monitor.s - -monitor.s: monitor.c monitor.ex monitor.h - cc -S -DMONITOR monitor.c - ex - monitor.s < monitor.ex - /lib/cpp monitor.s > monitor.S - mv monitor.S monitor.s - # -# NB: -x option to ncc is like -p, but uses -# different files to load at the beginning of -# the executable. +# Copyright (c) 1987 Regents of the University of California. +# All rights reserved. # -profit: profit.o monitor.o mcrt0.o - /bin/ld -X mcrt0.o monitor.o -o profit profit.o -lcp -# ${NCC} -x -p "-?" profit.o -o profit - -profit.o: - ${NCC} -x -p -c "-?" profit.c - -dprof.o: dprof.c dprof.h -arcs.o: arcs.c dprof.h -lookup.o: lookup.c dprof.h -dfn.o: dfn.c dprof.h -printdprof.o: printdprof.c dprof.h - -PDPROF = p.dprof.o p.arcs.o p.dfn.o p.lookup.o p.printdprof.o - -p.dprof: ${PDPROF} - /bin/ld -X mcrt0.o monitor.o -o p.dprof ${PDPROF} -lcp - -p.dprof.o: dprof.c dprof.h - ln dprof.c p.dprof.c - cc -c -p ${CFLAGS} p.dprof.c - rm p.dprof.c - -p.arcs.o: arcs.c dprof.h - ln arcs.c p.arcs.c - cc -c -p ${CFLAGS} p.arcs.c - rm p.arcs.c - -p.dfn.o: dfn.c dprof.h - ln dfn.c p.dfn.c - cc -c -p ${CFLAGS} p.dfn.c - rm p.dfn.c - -p.lookup.o: lookup.c dprof.h - ln lookup.c p.lookup.c - cc -c -p ${CFLAGS} p.lookup.c - rm p.lookup.c - -p.printdprof.o: printdprof.c dprof.h - ln printdprof.c p.printdprof.c - cc -c -p ${CFLAGS} p.printdprof.c - rm p.printdprof.c - -LINTFLAGS = -x -a -n -lint: - lint ${CFLAGS} ${LINTFLAGS} dprof.c arcs.c dfn.c lookup.c printdprof.c - -${DPROFHDRS} ${DPROFSRCS} ${OTHERS}: - ${GET} $@ - +# Redistribution and use in source and binary forms are permitted +# provided that the above copyright notice and this paragraph are +# duplicated in all such forms and that any documentation, +# advertising materials, and other materials related to such +# distribution and use acknowledge that the software was developed +# by the University of California, Berkeley. The name of the +# University may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# @(#)Makefile 5.13 (Berkeley) %G% +# +CFLAGS= -O +LIBC= /lib/libc.a +HDRS= gprof.h ${MACHINE}.h +SRCS= gprof.c arcs.c dfn.c lookup.c ${MACHINE}.c hertz.c \ + printgprof.c printlist.c +OBJS= gprof.o arcs.o dfn.o lookup.o ${MACHINE}.o hertz.o \ + printgprof.o printlist.o +MAN= gprof.0 + +all: gprof + +gprof: ${OBJS} ${LIBC} + ${CC} -o $@ ${CFLAGS} ${OBJS} + +gcrt0.h: FRC + -if [ -r gcrt0.h ] && \ + cmp -s gcrt0.h ../../lib/libc/${MACHINE}/csu/gmon.h; then \ + :; \ + else \ + rm -f gcrt0.h; \ + cp ../../lib/libc/${MACHINE}/csu/gmon.h gcrt0.h; \ + fi + +clean: + rm -f ${OBJS} core gprof + +cleandir: clean + rm -f ${MAN} tags .depend + +depend: ${SRCS} + mkdep ${CFLAGS} ${SRCS} + +install: ${MAN} + install -s -o bin -g bin -m 755 gprof ${DESTDIR}/usr/ucb/gprof + install -c -o bin -g bin -m 444 gprof.flat ${DESTDIR}/usr/lib + install -c -o bin -g bin -m 444 gprof.callg ${DESTDIR}/usr/lib + install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 + +lint: ${SRCS} + lint ${CFLAGS} ${SRCS} + +tags: ${SRCS} + ctags ${SRCS}