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