bfd:
[deliverable/binutils-gdb.git] / gprof / Makefile.am
CommitLineData
252b5132
RH
1## Process this file with automake to generate Makefile.in
2
3AUTOMAKE_OPTIONS = cygnus
79887925 4ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
252b5132
RH
5
6SUFFIXES = .m
7
8SUBDIRS = po
9
41b49281
AM
10BASEDIR = $(srcdir)/..
11BFDDIR = $(BASEDIR)/bfd
12INCDIR = $(BASEDIR)/include
13
a2d91340 14WARN_CFLAGS = @WARN_CFLAGS@
9e9b66a9 15NO_WERROR = @NO_WERROR@
a2d91340
AC
16AM_CFLAGS = $(WARN_CFLAGS)
17
41b49281
AM
18MKDEP = gcc -MM
19
0ab6f085 20INCLUDES = -DDEBUG -I../bfd -I$(srcdir)/../include \
92f01d61 21 -I$(srcdir)/../bfd @INCINTL@ -I. \
92f01d61 22 -DLOCALEDIR="\"$(datadir)/locale\""
252b5132
RH
23
24bin_PROGRAMS = gprof
25
26## Convenience var listing pure sources.
27sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
28 cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
29 search_list.c symtab.c sym_ids.c utils.c \
ec0806ec 30 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
252b5132 31gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
20e95c23
DJ
32gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
33gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
252b5132
RH
34
35noinst_HEADERS = \
36 basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
37 corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
38 search_list.h source.h sym_ids.h symtab.h utils.h
39
252b5132 40BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
c45021f2 41EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
252b5132 42
c45021f2 43diststuff: $(BUILT_SOURCES) info $(man_MANS)
252b5132 44
253a2395
NC
45# This empty rule is a hack against gmake patched by Apple.
46%.o:%.m
47
252b5132
RH
48.m.c:
49 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
50 FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
51 FILE=$*.m $(srcdir)/$*.m
52
53POTFILES = $(sources) $(noinst_HEADERS)
54po/POTFILES.in: @MAINT@ Makefile
323ee3f4 55 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
252b5132
RH
56 && mv tmp $(srcdir)/po/POTFILES.in
57
40f90528
AM
58MANCONF = -Dman
59
e49e529d 60TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
40f90528
AM
61
62POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
63
252b5132 64info_TEXINFOS = gprof.texi
37d037c1 65gprof_TEXINFOS = config.texi
252b5132
RH
66man_MANS = gprof.1
67
9975e4c4
DJ
68AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
69TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
e49e529d 70
dff70155
MM
71config.texi:
72 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
73
40f90528
AM
74# Build the man page from the texinfo file
75# The sed command removes the no-adjust Nroff command so that
76# the man output looks standard.
dff70155 77gprof.1: $(srcdir)/gprof.texi config.texi
c45021f2 78 touch $@
40f90528
AM
79 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
80 -($(POD2MAN) gprof.pod | \
c45021f2
NC
81 sed -e '/^.if n .na/d' > $@.T$$$$ && \
82 mv -f $@.T$$$$ $@) || \
83 (rm -f $@.T$$$$ && exit 1)
40f90528
AM
84 rm -f gprof.pod
85
31dd3154
JM
86.PHONY: install-pdf install-pdf-am install-pdf-recursive
87
88pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
89
90install-pdf: install-pdf-recursive install-pdf-am
91
92install-pdf-am: $(PDFS)
93 @$(NORMAL_INSTALL)
94 test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
95 @list='$(PDFS)'; for p in $$list; do \
96 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
97 f=$(pdf__strip_dir) \
98 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
99 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
100 done
101
102install-pdf-recursive:
103 @failcom='exit 1'; \
104 for f in x $$MAKEFLAGS; do \
105 case $$f in \
106 *=* | --[!k]*);; \
107 *k*) failcom='fail=yes';; \
108 esac; \
109 done; \
110 dot_seen=no; \
111 target=`echo $@ | sed s/-recursive//`; \
112 list='$(SUBDIRS)'; for subdir in $$list; do \
113 echo "Making $$target in $$subdir"; \
114 if test "$$subdir" = "."; then \
115 dot_seen=yes; \
116 local_target="$$target-am"; \
117 else \
118 local_target="$$target"; \
119 fi; \
120 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
121 || eval $$failcom; \
122 done; \
123 if test "$$dot_seen" = "no"; then \
124 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
125 fi; test -z "$$fail"
126
108a6f8e
CD
127.PHONY: install-html install-html-am install-html-recursive
128
129html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
130
131install-html: install-html-recursive install-html-am
132
133install-html-am: $(HTMLS)
134 @$(NORMAL_INSTALL)
135 test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
136 @list='$(HTMLS)'; for p in $$list; do \
137 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
138 f=$(html__strip_dir) \
139 if test -d "$$d$$p"; then \
140 echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
141 $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
142 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
143 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
144 else \
145 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
146 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
147 fi; \
148 done
149
150install-html-recursive:
151 @failcom='exit 1'; \
152 for f in x $$MAKEFLAGS; do \
153 case $$f in \
154 *=* | --[!k]*);; \
155 *k*) failcom='fail=yes';; \
156 esac; \
157 done; \
158 dot_seen=no; \
159 target=`echo $@ | sed s/-recursive//`; \
160 list='$(SUBDIRS)'; for subdir in $$list; do \
161 echo "Making $$target in $$subdir"; \
162 if test "$$subdir" = "."; then \
163 dot_seen=yes; \
164 local_target="$$target-am"; \
165 else \
166 local_target="$$target"; \
167 fi; \
168 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
169 || eval $$failcom; \
170 done; \
171 if test "$$dot_seen" = "no"; then \
172 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
173 fi; test -z "$$fail"
174
cd8e197b
HPN
175# We want install to imply install-info as per GNU standards, despite the
176# cygnus option.
6bf9431b 177install-data-local: install-info
cd8e197b 178
41b49281
AM
179# Targets to rebuild dependencies in this Makefile.
180# Have to get rid of DEP1 here so that "$?" later includes all sources.
181DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
182 rm -f DEP1
183 $(MAKE) MKDEP="$(MKDEP)" DEP1
0bdaf48b
AM
184 sed -f dep.sed < DEP1 > DEPA
185 echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
186 if grep ' /' DEPA > /dev/null 2> /dev/null; then \
1581f8c9
AM
187 echo 'make DEP failed!'; exit 1; \
188 else \
0bdaf48b 189 mv -f DEPA $@; \
1581f8c9 190 fi
41b49281
AM
191
192DEP1: $(gprof_SOURCES)
193 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
194 echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
195 $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
196 mv -f DEP2 $@
197
198dep.sed: dep-in.sed config.status
199 objdir=`pwd`; \
200 sed <$(srcdir)/dep-in.sed >dep.sed \
201 -e 's!@INCDIR@!$(INCDIR)!' \
202 -e 's!@BFDDIR@!$(BFDDIR)!' \
203 -e 's!@SRCDIR@!$(srcdir)!' \
8e42bcb6
AM
204 -e "s!@OBJDIR@!$${objdir}!" \
205 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
41b49281
AM
206
207dep: DEP
208 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
209 cat DEP >> tmp-Makefile
210 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
211
212dep-in: DEP
213 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
214 cat DEP >> tmp-Makefile.in
215 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
216
217dep-am: DEP
218 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
219 cat DEP >> tmp-Makefile.am
220 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
221
222.PHONY: dep dep-in dep-am
223
0bdaf48b 224CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
41b49281 225
d5fbea21
DJ
226MAINTAINERCLEANFILES = gprof.info
227
228# Automake 1.9 will only build info files in the objdir if they are
229# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
230# though, so we use a bogus condition.
231if GENINSRC_NEVER
232DISTCLEANFILES = gprof.info
233endif
234
41b49281
AM
235# DO NOT DELETE THIS LINE -- mkdep uses it.
236# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
81e80dda
AM
237basic_blocks.o: basic_blocks.c gprof.h $(BFDDIR)/sysdep.h \
238 ../bfd/config.h $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h \
239 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
240 gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
241 basic_blocks.h corefile.h gmon_io.h gmon_out.h search_list.h \
242 source.h symtab.h sym_ids.h
ba323545 243call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
ae351704 244 ../bfd/config.h $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h \
81e80dda
AM
245 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
246 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
247 call_graph.h corefile.h gmon_io.h gmon_out.h sym_ids.h
248cg_arcs.o: cg_arcs.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
249 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
250 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
251 $(INCDIR)/ansidecl.h search_list.h source.h symtab.h \
252 call_graph.h cg_arcs.h cg_dfn.h cg_print.h utils.h \
253 sym_ids.h
254cg_dfn.o: cg_dfn.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
255 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
256 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
257 $(INCDIR)/ansidecl.h search_list.h source.h symtab.h \
258 cg_arcs.h cg_dfn.h utils.h
259cg_print.o: cg_print.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
260 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
261 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
262 $(INCDIR)/ansidecl.h search_list.h source.h symtab.h \
263 cg_arcs.h cg_print.h hist.h utils.h corefile.h
264corefile.o: corefile.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
265 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
266 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
267 $(INCDIR)/ansidecl.h search_list.h source.h symtab.h \
268 hist.h corefile.h $(INCDIR)/safe-ctype.h
ae351704
AM
269gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
270 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
271 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/binary-io.h \
272 search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
273 corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
274 hertz.h hist.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
275gprof.o: gprof.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
276 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
277 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
278 $(INCDIR)/ansidecl.h ../bfd/bfdver.h search_list.h \
279 source.h symtab.h basic_blocks.h call_graph.h cg_arcs.h \
280 cg_print.h corefile.h gmon_io.h hertz.h hist.h sym_ids.h \
281 $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
ae351704
AM
282hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
283 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
284 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h hertz.h
285hist.o: hist.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
286 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
287 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
288 $(INCDIR)/ansidecl.h search_list.h source.h symtab.h \
289 corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h utils.h
ae351704
AM
290source.o: source.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
291 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
292 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
293 $(INCDIR)/ansidecl.h search_list.h source.h
294search_list.o: search_list.c gprof.h $(BFDDIR)/sysdep.h \
295 ../bfd/config.h $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h \
296 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
066c2a57 297 gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
81e80dda 298 search_list.h
ae351704
AM
299symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
300 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
301 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
302 source.h symtab.h cg_arcs.h corefile.h
303sym_ids.o: sym_ids.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
ae351704 304 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
305 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/libiberty.h \
306 $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h search_list.h \
307 source.h symtab.h cg_arcs.h sym_ids.h corefile.h
308utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
ae351704 309 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
310 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/demangle.h \
311 $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h search_list.h \
312 source.h symtab.h cg_arcs.h utils.h corefile.h
ae351704
AM
313i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
314 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
315 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
316 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
317alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
318 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
319 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
320 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
321vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
322 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
323 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
324 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
325tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
326 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
327 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
328 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
329sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
330 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
331 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
332 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
333mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
334 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
335 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
336 source.h symtab.h cg_arcs.h corefile.h hist.h
3099538b
AM
337flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
338bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
339fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
41b49281 340# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.442072 seconds and 4 git commands to generate.