top level:
[binutils.git] / gprof / Makefile.am
blob84ff58a3ba51d72affb9e56654d4ed86467d21fc
1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 SUFFIXES = .m
7 SUBDIRS = po
9 BASEDIR = $(srcdir)/..
10 BFDDIR = $(BASEDIR)/bfd
11 INCDIR  = $(BASEDIR)/include
13 WARN_CFLAGS = @WARN_CFLAGS@
14 NO_WERROR = @NO_WERROR@
15 AM_CFLAGS = $(WARN_CFLAGS)
17 MKDEP = gcc -MM
19 PKGVERSION = "\"@PKGVERSION@\""
20 REPORT_BUGS_TO = "\"@REPORT_BUGS_TO@\""
22 INCLUDES = -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\""
28 bin_PROGRAMS = gprof
30 ## Convenience var listing pure sources.
31 sources = 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 \
34         i386.c alpha.c vax.c tahoe.c sparc.c mips.c
35 gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
36 gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
37 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
39 noinst_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
44 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
45 EXTRA_DIST    = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
47 diststuff: $(BUILT_SOURCES) info $(man_MANS)
49 # This empty rule is a hack against gmake patched by Apple.
50 %.o:%.m
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
57 POTFILES = $(sources) $(noinst_HEADERS)
58 po/POTFILES.in: @MAINT@ Makefile
59         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
60           && mv tmp $(srcdir)/po/POTFILES.in
62 MANCONF  = -Dman
64 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
66 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
68 info_TEXINFOS = gprof.texi
69 gprof_TEXINFOS = config.texi
70 man_MANS = gprof.1
72 config.texi:
73         echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
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.
78 gprof.1: $(srcdir)/gprof.texi config.texi
79         touch $@
80         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
81         -($(POD2MAN) gprof.pod | \
82                sed -e '/^.if n .na/d' > $@.T$$$$ && \
83                mv -f $@.T$$$$ $@) || \
84                (rm -f $@.T$$$$ && exit 1)
85         rm -f gprof.pod
87 .PHONY: install-html install-html-am install-html-recursive
89 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
91 install-html: install-html-recursive  install-html-am
93 install-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
110 install-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"
135 # We want install to imply install-info as per GNU standards, despite the
136 # cygnus option.
137 install-data-local: install-info
139 # Targets to rebuild dependencies in this Makefile.
140 # Have to get rid of DEP1 here so that "$?" later includes all sources.
141 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
142         rm -f DEP1
143         $(MAKE) MKDEP="$(MKDEP)" DEP1
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 \
147           echo 'make DEP failed!'; exit 1; \
148         else \
149           mv -f DEPA $@; \
150         fi
152 DEP1: $(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 $@
158 dep.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)!'      \
164                 -e "s!@OBJDIR@!$${objdir}!"     \
165                 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
167 dep: 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
172 dep-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
177 dep-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
182 .PHONY: dep dep-in dep-am
184 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
186 MAINTAINERCLEANFILES = gprof.info
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.
191 if GENINSRC_NEVER
192 DISTCLEANFILES = gprof.info
193 endif
195 # DO NOT DELETE THIS LINE -- mkdep uses it.
196 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
197 basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
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
203 call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
204   $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
205   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
206   $(INCDIR)/symcat.h ./gconfig.h search_list.h source.h \
207   symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
208   gmon_out.h sym_ids.h
209 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
215 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
221 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
227 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
232 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
233   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
238 gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
245 hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
246   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
247   ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
248   ./gconfig.h hertz.h
249 hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
255 source.o: source.c 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 \
258   ./gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
259   $(INCDIR)/filenames.h search_list.h source.h
260 search_list.o: search_list.c $(INCDIR)/libiberty.h \
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
265 symtab.o: symtab.c 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 \
268   ./gconfig.h search_list.h source.h symtab.h cg_arcs.h \
269   corefile.h
270 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
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
276 utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
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
282 i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
283   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
287 alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
288   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
292 vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
293   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
297 tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
298   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
302 sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
303   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
307 mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
308   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
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
312 flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
313 bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
314 fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
315 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY