Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | ## Process this file with automake to generate Makefile.in |
2 | ||
3 | AUTOMAKE_OPTIONS = cygnus | |
4 | ||
5 | SUFFIXES = .m | |
6 | ||
7 | SUBDIRS = po | |
8 | ||
41b49281 AM |
9 | BASEDIR = $(srcdir)/.. |
10 | BFDDIR = $(BASEDIR)/bfd | |
11 | INCDIR = $(BASEDIR)/include | |
12 | ||
a2d91340 AC |
13 | WARN_CFLAGS = @WARN_CFLAGS@ |
14 | AM_CFLAGS = $(WARN_CFLAGS) | |
15 | ||
41b49281 AM |
16 | MKDEP = gcc -MM |
17 | ||
18 | INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(prefix)/share/locale\"" | |
252b5132 RH |
19 | |
20 | bin_PROGRAMS = gprof | |
21 | ||
22 | ## Convenience var listing pure sources. | |
23 | sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \ | |
24 | cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \ | |
25 | search_list.c symtab.c sym_ids.c utils.c \ | |
26 | i386.c alpha.c vax.c tahoe.c sparc.c | |
27 | gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c | |
28 | gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS) | |
29 | gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS) | |
30 | ||
31 | noinst_HEADERS = \ | |
32 | basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \ | |
33 | corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \ | |
34 | search_list.h source.h sym_ids.h symtab.h utils.h | |
35 | ||
252b5132 | 36 | BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c |
c45021f2 | 37 | EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS) |
252b5132 | 38 | |
c45021f2 | 39 | diststuff: $(BUILT_SOURCES) info $(man_MANS) |
252b5132 RH |
40 | |
41 | .m.c: | |
42 | awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ | |
43 | FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \ | |
44 | FILE=$*.m $(srcdir)/$*.m | |
45 | ||
46 | POTFILES = $(sources) $(noinst_HEADERS) | |
47 | po/POTFILES.in: @MAINT@ Makefile | |
48 | for file in $(POTFILES); do echo $$file; done | sort > tmp \ | |
49 | && mv tmp $(srcdir)/po/POTFILES.in | |
50 | ||
40f90528 AM |
51 | MANCONF = -Dman |
52 | ||
53 | TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl | |
54 | ||
55 | POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1 | |
56 | ||
252b5132 RH |
57 | info_TEXINFOS = gprof.texi |
58 | man_MANS = gprof.1 | |
59 | ||
40f90528 AM |
60 | # Build the man page from the texinfo file |
61 | # The sed command removes the no-adjust Nroff command so that | |
62 | # the man output looks standard. | |
c45021f2 NC |
63 | gprof.1: $(srcdir)/gprof.texi |
64 | touch $@ | |
40f90528 AM |
65 | -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod |
66 | -($(POD2MAN) gprof.pod | \ | |
c45021f2 NC |
67 | sed -e '/^.if n .na/d' > $@.T$$$$ && \ |
68 | mv -f $@.T$$$$ $@) || \ | |
69 | (rm -f $@.T$$$$ && exit 1) | |
40f90528 AM |
70 | rm -f gprof.pod |
71 | ||
7997656a AM |
72 | Makefile: $(BFDDIR)/configure.in |
73 | ||
41b49281 AM |
74 | # Targets to rebuild dependencies in this Makefile. |
75 | # Have to get rid of DEP1 here so that "$?" later includes all sources. | |
76 | DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h | |
77 | rm -f DEP1 | |
78 | $(MAKE) MKDEP="$(MKDEP)" DEP1 | |
0bdaf48b AM |
79 | sed -f dep.sed < DEP1 > DEPA |
80 | echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA | |
81 | if grep ' /' DEPA > /dev/null 2> /dev/null; then \ | |
1581f8c9 AM |
82 | echo 'make DEP failed!'; exit 1; \ |
83 | else \ | |
0bdaf48b | 84 | mv -f DEPA $@; \ |
1581f8c9 | 85 | fi |
41b49281 AM |
86 | |
87 | DEP1: $(gprof_SOURCES) | |
88 | echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 | |
89 | echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2 | |
90 | $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2 | |
91 | mv -f DEP2 $@ | |
92 | ||
93 | dep.sed: dep-in.sed config.status | |
94 | objdir=`pwd`; \ | |
95 | sed <$(srcdir)/dep-in.sed >dep.sed \ | |
96 | -e 's!@INCDIR@!$(INCDIR)!' \ | |
97 | -e 's!@BFDDIR@!$(BFDDIR)!' \ | |
98 | -e 's!@SRCDIR@!$(srcdir)!' \ | |
99 | -e "s!@OBJDIR@!$${objdir}!" | |
100 | ||
101 | dep: DEP | |
102 | sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile | |
103 | cat DEP >> tmp-Makefile | |
104 | $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile | |
105 | ||
106 | dep-in: DEP | |
107 | sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in | |
108 | cat DEP >> tmp-Makefile.in | |
109 | $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in | |
110 | ||
111 | dep-am: DEP | |
112 | sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am | |
113 | cat DEP >> tmp-Makefile.am | |
114 | $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am | |
115 | ||
116 | .PHONY: dep dep-in dep-am | |
117 | ||
0bdaf48b | 118 | CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 |
41b49281 AM |
119 | |
120 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
121 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
122 | basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \ | |
2114f57b AM |
123 | $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \ |
124 | $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \ | |
125 | $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \ | |
7997656a AM |
126 | ../bfd/bfd.h $(INCDIR)/symcat.h corefile.h gmon_io.h \ |
127 | gmon.h gmon_out.h $(INCDIR)/libiberty.h sym_ids.h | |
2114f57b AM |
128 | call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \ |
129 | $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
130 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ | |
7997656a AM |
131 | symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h source.h search_list.h \ |
132 | call_graph.h corefile.h gmon_io.h gmon.h gmon_out.h \ | |
133 | sym_ids.h | |
41b49281 AM |
134 | cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
135 | gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
2114f57b | 136 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ |
7997656a AM |
137 | call_graph.h symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h \ |
138 | source.h search_list.h cg_arcs.h cg_dfn.h cg_print.h \ | |
139 | utils.h sym_ids.h | |
41b49281 AM |
140 | cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
141 | gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
2114f57b | 142 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ |
7997656a AM |
143 | cg_arcs.h symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h \ |
144 | source.h search_list.h cg_dfn.h utils.h | |
41b49281 AM |
145 | cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
146 | cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ | |
2114f57b | 147 | $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \ |
7997656a AM |
148 | $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h \ |
149 | source.h search_list.h cg_print.h hist.h utils.h | |
41b49281 AM |
150 | corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
151 | gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
2114f57b | 152 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ |
7997656a AM |
153 | corefile.h ../bfd/bfd.h $(INCDIR)/symcat.h symtab.h \ |
154 | source.h search_list.h | |
2114f57b AM |
155 | gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \ |
156 | $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
157 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ | |
7997656a AM |
158 | symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h source.h search_list.h \ |
159 | basic_blocks.h corefile.h call_graph.h gmon_io.h gmon.h \ | |
160 | gmon_out.h hertz.h hist.h $(INCDIR)/libiberty.h | |
41b49281 AM |
161 | gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ |
162 | $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ | |
2114f57b AM |
163 | $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \ |
164 | $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \ | |
7997656a AM |
165 | symtab.h ../bfd/bfd.h $(INCDIR)/symcat.h call_graph.h \ |
166 | cg_arcs.h cg_print.h corefile.h gmon_io.h gmon.h hertz.h \ | |
167 | hist.h sym_ids.h $(INCDIR)/demangle.h | |
2114f57b AM |
168 | hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \ |
169 | $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
170 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h | |
41b49281 AM |
171 | hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
172 | gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \ | |
2114f57b | 173 | $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \ |
7997656a AM |
174 | corefile.h ../bfd/bfd.h $(INCDIR)/symcat.h gmon_io.h \ |
175 | gmon.h gmon_out.h hist.h symtab.h source.h search_list.h \ | |
176 | sym_ids.h utils.h | |
2114f57b AM |
177 | source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
178 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
179 | gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \ | |
180 | search_list.h source.h | |
41b49281 AM |
181 | search_list.o: search_list.c $(INCDIR)/libiberty.h \ |
182 | $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ | |
2114f57b AM |
183 | $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \ |
184 | $(INCDIR)/bin-bugs.h search_list.h | |
185 | symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ | |
186 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
187 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a | 188 | $(INCDIR)/symcat.h source.h search_list.h corefile.h |
41b49281 | 189 | sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ |
7997656a AM |
190 | $(INCDIR)/safe-ctype.h cg_arcs.h gprof.h $(BFDDIR)/sysdep.h \ |
191 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
192 | gconfig.h $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h \ | |
193 | $(INCDIR)/symcat.h source.h search_list.h sym_ids.h | |
41b49281 | 194 | utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \ |
2114f57b AM |
195 | $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \ |
196 | $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a | 197 | $(INCDIR)/symcat.h source.h search_list.h |
2114f57b AM |
198 | i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
199 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
200 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a AM |
201 | $(INCDIR)/symcat.h source.h search_list.h corefile.h \ |
202 | hist.h | |
2114f57b AM |
203 | alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
204 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
205 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a AM |
206 | $(INCDIR)/symcat.h source.h search_list.h corefile.h \ |
207 | hist.h | |
2114f57b AM |
208 | vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
209 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
210 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a AM |
211 | $(INCDIR)/symcat.h source.h search_list.h corefile.h \ |
212 | hist.h | |
2114f57b AM |
213 | tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
214 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
215 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a AM |
216 | $(INCDIR)/symcat.h source.h search_list.h corefile.h \ |
217 | hist.h | |
2114f57b AM |
218 | sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \ |
219 | ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \ | |
220 | gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \ | |
7997656a AM |
221 | $(INCDIR)/symcat.h source.h search_list.h corefile.h \ |
222 | hist.h | |
252b5132 | 223 | flat_bl.o: flat_bl.c |
41b49281 | 224 | bsd_callg_bl.o: bsd_callg_bl.c |
252b5132 | 225 | fsf_callg_bl.o: fsf_callg_bl.c |
41b49281 | 226 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |