2006-12-01 Paul Brook <paul@codesourcery.com>
[binutils.git] / gprof / Makefile.am
blobb82d59a0a5b7fc687a454710eee69e210ae9b171
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 -I$(srcdir)/../intl -I../intl -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 $(INTLDEPS)
37 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS)
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 .m.c:
50         awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
51             FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
52             FILE=$*.m $(srcdir)/$*.m
54 POTFILES = $(sources) $(noinst_HEADERS)
55 po/POTFILES.in: @MAINT@ Makefile
56         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
57           && mv tmp $(srcdir)/po/POTFILES.in
59 MANCONF  = -Dman
61 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
63 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
65 info_TEXINFOS = gprof.texi
66 man_MANS = gprof.1
68 $(srcdir)/gprof.info: gprof.texi config.texi
70 config.texi:
71         echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
73 # Build the man page from the texinfo file
74 # The sed command removes the no-adjust Nroff command so that
75 # the man output looks standard.
76 gprof.1: $(srcdir)/gprof.texi config.texi
77         touch $@
78         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
79         -($(POD2MAN) gprof.pod | \
80                sed -e '/^.if n .na/d' > $@.T$$$$ && \
81                mv -f $@.T$$$$ $@) || \
82                (rm -f $@.T$$$$ && exit 1)
83         rm -f gprof.pod
85 .PHONY: install-html install-html-am install-html-recursive
87 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
89 install-html: install-html-recursive  install-html-am
91 install-html-am: $(HTMLS)
92         @$(NORMAL_INSTALL)
93         test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
94         @list='$(HTMLS)'; for p in $$list; do \
95           if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
96           f=$(html__strip_dir) \
97           if test -d "$$d$$p"; then \
98             echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
99             $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
100             echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
101             $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
102           else \
103             echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
104             $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
105           fi; \
106         done
108 install-html-recursive:
109         @failcom='exit 1'; \
110         for f in x $$MAKEFLAGS; do \
111           case $$f in \
112             *=* | --[!k]*);; \
113             *k*) failcom='fail=yes';; \
114           esac; \
115         done; \
116         dot_seen=no; \
117         target=`echo $@ | sed s/-recursive//`; \
118         list='$(SUBDIRS)'; for subdir in $$list; do \
119           echo "Making $$target in $$subdir"; \
120           if test "$$subdir" = "."; then \
121             dot_seen=yes; \
122             local_target="$$target-am"; \
123           else \
124             local_target="$$target"; \
125           fi; \
126           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
127           || eval $$failcom; \
128         done; \
129         if test "$$dot_seen" = "no"; then \
130           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
131         fi; test -z "$$fail"
133 # We want install to imply install-info as per GNU standards, despite the
134 # cygnus option.
135 install-data-local: install-info
137 # Targets to rebuild dependencies in this Makefile.
138 # Have to get rid of DEP1 here so that "$?" later includes all sources.
139 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
140         rm -f DEP1
141         $(MAKE) MKDEP="$(MKDEP)" DEP1
142         sed -f dep.sed < DEP1 > DEPA
143         echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
144         if grep ' /' DEPA > /dev/null 2> /dev/null; then \
145           echo 'make DEP failed!'; exit 1; \
146         else \
147           mv -f DEPA $@; \
148         fi
150 DEP1: $(gprof_SOURCES)
151         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
152         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
153         $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
154         mv -f DEP2 $@
156 dep.sed: dep-in.sed config.status
157         objdir=`pwd`; \
158         sed <$(srcdir)/dep-in.sed >dep.sed      \
159                 -e 's!@INCDIR@!$(INCDIR)!'      \
160                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
161                 -e 's!@SRCDIR@!$(srcdir)!'      \
162                 -e "s!@OBJDIR@!$${objdir}!"     \
163                 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
165 dep: DEP
166         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
167         cat DEP >> tmp-Makefile
168         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
170 dep-in: DEP
171         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
172         cat DEP >> tmp-Makefile.in
173         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
175 dep-am: DEP
176         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
177         cat DEP >> tmp-Makefile.am
178         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
180 .PHONY: dep dep-in dep-am
182 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
184 # DO NOT DELETE THIS LINE -- mkdep uses it.
185 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
186 basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
187   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
188   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
189   $(INCDIR)/symcat.h gconfig.h basic_blocks.h \
190   corefile.h gmon_io.h gmon_out.h search_list.h source.h \
191   symtab.h sym_ids.h
192 call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
193   $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
194   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
195   gconfig.h search_list.h source.h \
196   symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
197   gmon_out.h sym_ids.h
198 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
199   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
200   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
201   gconfig.h search_list.h source.h \
202   symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
203   utils.h sym_ids.h
204 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
205   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
206   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
207   gconfig.h search_list.h source.h \
208   symtab.h cg_arcs.h cg_dfn.h utils.h
209 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
210   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
211   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
212   gconfig.h search_list.h source.h \
213   symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
214 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
215   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
216   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
217   gconfig.h search_list.h source.h \
218   symtab.h corefile.h
219 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
220   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
221   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
222   search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
223   corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
224   hertz.h hist.h $(INCDIR)/libiberty.h
225 gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
226   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
227   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
228   gconfig.h search_list.h source.h \
229   symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
230   corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
231 hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
232   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
233   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
234   hertz.h
235 hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
236   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
237   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
238   gconfig.h search_list.h source.h \
239   symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
240   utils.h
241 source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
242   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
243   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
244   $(INCDIR)/libiberty.h search_list.h source.h
245 search_list.o: search_list.c $(INCDIR)/libiberty.h \
246   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
247   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
248   $(INCDIR)/symcat.h gconfig.h search_list.h
249 symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
250   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
251   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
252   search_list.h source.h symtab.h cg_arcs.h corefile.h
253 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
254   $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
255   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
256   $(INCDIR)/symcat.h gconfig.h search_list.h \
257   source.h symtab.h cg_arcs.h sym_ids.h
258 utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
259   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
260   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
261   $(INCDIR)/symcat.h gconfig.h search_list.h \
262   source.h symtab.h cg_arcs.h utils.h
263 i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
264   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
265   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
266   search_list.h source.h symtab.h cg_arcs.h corefile.h \
267   hist.h
268 alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
269   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
270   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
271   search_list.h source.h symtab.h cg_arcs.h corefile.h \
272   hist.h
273 vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
274   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
275   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
276   search_list.h source.h symtab.h cg_arcs.h corefile.h \
277   hist.h
278 tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
279   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
280   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
281   search_list.h source.h symtab.h cg_arcs.h corefile.h \
282   hist.h
283 sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
284   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
285   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
286   search_list.h source.h symtab.h cg_arcs.h corefile.h \
287   hist.h
288 mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
289   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
290   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h \
291   search_list.h source.h symtab.h cg_arcs.h corefile.h \
292   hist.h
293 flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
294 bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
295 fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
296 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY