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