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