]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gprof/Makefile.in
(install-info): Check for gprof.info in build dir, fall back to srcdir. Depend
[thirdparty/binutils-gdb.git] / gprof / Makefile.in
1 # @(#)Makefile 5.17 (Berkeley) 5/11/90
2
3 srcdir = .
4
5 prefix = /usr/local
6
7 program_prefix =
8 exec_prefix = $(prefix)
9 program_transform_name =
10 bindir = $(exec_prefix)/bin
11 libdir = $(exec_prefix)/lib
12 tooldir = $(libdir)
13 mandir = $(prefix)/man
14 man1dir = $(mandir)/man1
15
16 infodir = $(prefix)/info
17 datadir = $(prefix)/lib
18
19 INSTALL = `cd $(srcdir); pwd`/../install.sh -c
20 INSTALL_PROGRAM = $(INSTALL)
21 INSTALL_DATA = $(INSTALL)
22 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
23 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
24 MAKEINFO = makeinfo
25 TEX = tex
26 TEXINDEX = texindex
27
28 # this is the directory we look in to find Texinfo
29 texidir = $(srcdir)/../texinfo
30
31 #### host and target dependent Makefile fragments come in here.
32 ###
33
34 PROG= gprof
35 SRCS= gprof.c arcs.c dfn.c lookup.c $(MY_MACHINE).c hertz.c \
36 printgprof.c printlist.c
37 LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a
38
39 OBJS= gprof.o arcs.o dfn.o lookup.o $(MY_MACHINE).o hertz.o \
40 printgprof.o printlist.o \
41 flat_bl.o bsd_callg_bl.o fsf_callg_bl.o
42
43 # Files that can be generated, but should be included in distribution.
44 DISTSTUFF = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
45
46 CFLAGS=-g
47 LDFLAGS=
48 .c.o:
49 $(CC) -c $(CFLAGS) -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -DMACHINE_H=\"$(MY_MACHINE).h\" $(TCFLAGS) $(HCFLAGS) $<
50
51 all: diststuff $(PROG)
52
53 .PHONY: check installcheck info install-info
54 .SUFFIXES: .m
55
56 .m.c:
57 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
58 FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \
59 FILE=$*.m $(srcdir)/$*.m
60
61 diststuff: $(DISTSTUFF)
62
63 gprof.info: gprof.texi
64 $(MAKEINFO) -o gprof.info $(srcdir)/gprof.texi
65
66 gprof.dvi: gprof.texi
67 TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
68 $(TEXINDEX) gprof.??
69 TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
70
71 info: gprof.info
72
73 dvi: gprof.dvi
74
75 check:
76 installcheck:
77
78 install-info: gprof.info
79 if [ -r gprof.info ]; then \
80 dir=. ; \
81 else \
82 dir=$(srcdir) ; \
83 fi ; \
84 for i in `cd $$dir; echo gprof.info*` ; do \
85 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
86 done
87
88 install:
89 $(INSTALL_XFORM) gprof $(bindir)/gprof
90 $(INSTALL_XFORM1) $(srcdir)/gprof.1 $(man1dir)/gprof.1
91 -n=`t='$(program_transform_name)'; echo gprof | sed -e "s/brokensed/brokensed/" $$t`; \
92 rm -f $(tooldir)/bin/gprof; \
93 ln $(bindir)/$$n $(tooldir)/bin/gprof \
94 || $(INSTALL_PROGRAM) gprof $(tooldir)/bin/gprof;
95
96
97 gprof: $(OBJS)
98 $(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)
99
100 mostlyclean:
101 -rm -f *.o core gprof nohup.out gprof.info* \
102 gprof.cps gprof.fns gprof.log gprof.ps gprof.tps\
103 gprof.aux gprof.dvi gprof.ky gprof.pg gprof.toc gprof.vr\
104 gprof.cp gprof.fn gprof.kys gprof.pgs gprof.tp gprof.vrs
105 clean: mostlyclean
106 -rm -f gprof
107 distclean: clean
108 -rm -f config.status Makefile
109 realclean: distclean
110 -rm -f $(DISTSTUFF)
111
112 Makefile : Makefile.in
113 sh config.status
114
115
116 # These get around a bug in Sun Make in SunOS 4.1.1 and Solaris 2
117 gprof.o: gprof.c
118 arcs.o: arcs.c
119 dfn.o: dfn.c
120 lookup.o: lookup.c
121 $(MY_MACHINE).o: $(MY_MACHINE).c
122 hertz.o: hertz.c
123 printgprof.o: printgprof.c
124 printlist.o: printlist.c
125 flat_bl.o: flat_bl.c
126 bsd_callg_bl.o: bsd_callg_bl.c
127 fsf_callg_bl.o: fsf_callg_bl.c