* gmon_io.h: Don't include sysdep.h here.
[deliverable/binutils-gdb.git] / gprof / Makefile.am
CommitLineData
252b5132
RH
1## Process this file with automake to generate Makefile.in
2
3AUTOMAKE_OPTIONS = cygnus
79887925 4ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
252b5132
RH
5
6SUFFIXES = .m
7
8SUBDIRS = po
9
41b49281
AM
10BASEDIR = $(srcdir)/..
11BFDDIR = $(BASEDIR)/bfd
12INCDIR = $(BASEDIR)/include
13
a2d91340 14WARN_CFLAGS = @WARN_CFLAGS@
9e9b66a9 15NO_WERROR = @NO_WERROR@
a2d91340
AC
16AM_CFLAGS = $(WARN_CFLAGS)
17
41b49281
AM
18MKDEP = gcc -MM
19
0ab6f085 20INCLUDES = -DDEBUG -I../bfd -I$(srcdir)/../include \
92f01d61 21 -I$(srcdir)/../bfd @INCINTL@ -I. \
92f01d61 22 -DLOCALEDIR="\"$(datadir)/locale\""
252b5132
RH
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 \
ec0806ec 30 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
252b5132 31gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
20e95c23
DJ
32gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
33gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
252b5132
RH
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
252b5132 40BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
c45021f2 41EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
252b5132 42
c45021f2 43diststuff: $(BUILT_SOURCES) info $(man_MANS)
252b5132 44
253a2395
NC
45# This empty rule is a hack against gmake patched by Apple.
46%.o:%.m
47
252b5132
RH
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
323ee3f4 55 for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
252b5132
RH
56 && mv tmp $(srcdir)/po/POTFILES.in
57
40f90528
AM
58MANCONF = -Dman
59
e49e529d 60TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
40f90528
AM
61
62POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
63
252b5132 64info_TEXINFOS = gprof.texi
37d037c1 65gprof_TEXINFOS = config.texi
252b5132
RH
66man_MANS = gprof.1
67
9975e4c4
DJ
68AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
69TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
e49e529d 70
dff70155
MM
71config.texi:
72 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
73
40f90528
AM
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.
dff70155 77gprof.1: $(srcdir)/gprof.texi config.texi
c45021f2 78 touch $@
40f90528
AM
79 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
80 -($(POD2MAN) gprof.pod | \
c45021f2
NC
81 sed -e '/^.if n .na/d' > $@.T$$$$ && \
82 mv -f $@.T$$$$ $@) || \
83 (rm -f $@.T$$$$ && exit 1)
40f90528
AM
84 rm -f gprof.pod
85
108a6f8e
CD
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
cd8e197b
HPN
134# We want install to imply install-info as per GNU standards, despite the
135# cygnus option.
6bf9431b 136install-data-local: install-info
cd8e197b 137
41b49281
AM
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
0bdaf48b
AM
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 \
1581f8c9
AM
146 echo 'make DEP failed!'; exit 1; \
147 else \
0bdaf48b 148 mv -f DEPA $@; \
1581f8c9 149 fi
41b49281
AM
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)!' \
8e42bcb6
AM
163 -e "s!@OBJDIR@!$${objdir}!" \
164 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
41b49281
AM
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
0bdaf48b 183CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
41b49281 184
d5fbea21
DJ
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
41b49281
AM
194# DO NOT DELETE THIS LINE -- mkdep uses it.
195# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
81e80dda
AM
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
ba323545 202call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
ae351704 203 ../bfd/config.h $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h \
81e80dda
AM
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
ae351704
AM
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 \
81e80dda
AM
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
ae351704
AM
241hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
242 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
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
ae351704
AM
249source.o: source.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
250 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
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 \
066c2a57 256 gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
81e80dda 257 search_list.h
ae351704
AM
258symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
259 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
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 \
ae351704 263 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
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 \
ae351704 268 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
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
ae351704
AM
272i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
273 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
274 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
275 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
276alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
277 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
278 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
279 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
280vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
281 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
282 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
283 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
284tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
285 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
286 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
287 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
288sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
289 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
290 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
291 source.h symtab.h cg_arcs.h corefile.h hist.h
ae351704
AM
292mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
293 $(INCDIR)/ansidecl.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
81e80dda
AM
294 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h search_list.h \
295 source.h symtab.h cg_arcs.h corefile.h hist.h
3099538b
AM
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
41b49281 299# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.362212 seconds and 4 git commands to generate.