*** empty log message ***
[deliverable/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
19INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include \
20 -I$(srcdir)/../bfd @INCINTL@ -I. \
92f01d61 21 -DLOCALEDIR="\"$(datadir)/locale\""
252b5132
RH
22
23bin_PROGRAMS = gprof
24
25## Convenience var listing pure sources.
26sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
27 cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
28 search_list.c symtab.c sym_ids.c utils.c \
ec0806ec 29 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
252b5132 30gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
20e95c23
DJ
31gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
32gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
252b5132
RH
33
34noinst_HEADERS = \
35 basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
36 corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
37 search_list.h source.h sym_ids.h symtab.h utils.h
38
252b5132 39BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
c45021f2 40EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
252b5132 41
c45021f2 42diststuff: $(BUILT_SOURCES) info $(man_MANS)
252b5132 43
253a2395
NC
44# This empty rule is a hack against gmake patched by Apple.
45%.o:%.m
46
252b5132
RH
47.m.c:
48 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
49 FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
50 FILE=$*.m $(srcdir)/$*.m
51
52POTFILES = $(sources) $(noinst_HEADERS)
53po/POTFILES.in: @MAINT@ Makefile
68cdbb4a 54 for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
252b5132
RH
55 && mv tmp $(srcdir)/po/POTFILES.in
56
40f90528
AM
57MANCONF = -Dman
58
e49e529d 59TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
40f90528
AM
60
61POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
62
252b5132 63info_TEXINFOS = gprof.texi
37d037c1 64gprof_TEXINFOS = config.texi
252b5132
RH
65man_MANS = gprof.1
66
e49e529d
JM
67AM_MAKEINFOFLAGS = -I "$(srcdir)" -I ../bfd/doc
68TEXI2DVI = texi2dvi -I "$(srcdir)" -I ../bfd/doc
69
dff70155
MM
70config.texi:
71 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
72
40f90528
AM
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.
dff70155 76gprof.1: $(srcdir)/gprof.texi config.texi
c45021f2 77 touch $@
40f90528
AM
78 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
79 -($(POD2MAN) gprof.pod | \
c45021f2
NC
80 sed -e '/^.if n .na/d' > $@.T$$$$ && \
81 mv -f $@.T$$$$ $@) || \
82 (rm -f $@.T$$$$ && exit 1)
40f90528
AM
83 rm -f gprof.pod
84
108a6f8e
CD
85.PHONY: install-html install-html-am install-html-recursive
86
87html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
88
89install-html: install-html-recursive install-html-am
90
91install-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
107
108install-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"
132
cd8e197b
HPN
133# We want install to imply install-info as per GNU standards, despite the
134# cygnus option.
6bf9431b 135install-data-local: install-info
cd8e197b 136
41b49281
AM
137# Targets to rebuild dependencies in this Makefile.
138# Have to get rid of DEP1 here so that "$?" later includes all sources.
139DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
140 rm -f DEP1
141 $(MAKE) MKDEP="$(MKDEP)" DEP1
0bdaf48b
AM
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 \
1581f8c9
AM
145 echo 'make DEP failed!'; exit 1; \
146 else \
0bdaf48b 147 mv -f DEPA $@; \
1581f8c9 148 fi
41b49281
AM
149
150DEP1: $(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 $@
155
156dep.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)!' \
8e42bcb6
AM
162 -e "s!@OBJDIR@!$${objdir}!" \
163 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
41b49281
AM
164
165dep: 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
169
170dep-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
174
175dep-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
179
180.PHONY: dep dep-in dep-am
181
0bdaf48b 182CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
41b49281 183
d5fbea21
DJ
184MAINTAINERCLEANFILES = gprof.info
185
186# Automake 1.9 will only build info files in the objdir if they are
187# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
188# though, so we use a bogus condition.
189if GENINSRC_NEVER
190DISTCLEANFILES = gprof.info
191endif
192
41b49281
AM
193# DO NOT DELETE THIS LINE -- mkdep uses it.
194# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ba323545 195basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
92f01d61
JM
196 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
197 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
198 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 199 gconfig.h basic_blocks.h corefile.h gmon_io.h gmon_out.h \
92f01d61 200 search_list.h source.h symtab.h sym_ids.h
ba323545
AM
201call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
202 $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
92f01d61 203 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
066c2a57 204 $(INCDIR)/symcat.h gconfig.h search_list.h source.h \
ba323545
AM
205 symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
206 gmon_out.h sym_ids.h
41b49281 207cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
208 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
209 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
210 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
211 source.h symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
212 utils.h sym_ids.h
41b49281 213cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
214 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
215 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
216 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
217 source.h symtab.h cg_arcs.h cg_dfn.h utils.h
41b49281 218cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
219 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
220 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
221 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
222 source.h symtab.h cg_arcs.h cg_print.h hist.h utils.h \
223 corefile.h
41b49281 224corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
225 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
226 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
227 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
228 source.h symtab.h corefile.h
ba323545
AM
229gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
230 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 231 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 232 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61
JM
233 basic_blocks.h corefile.h call_graph.h gmon_io.h gmon_out.h \
234 gmon.h hertz.h hist.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
6f53ec68 235gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
236 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
237 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57 238 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h ../bfd/bfdver.h \
92f01d61
JM
239 search_list.h source.h symtab.h basic_blocks.h call_graph.h \
240 cg_arcs.h cg_print.h corefile.h gmon_io.h hertz.h hist.h \
241 sym_ids.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
ba323545
AM
242hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
243 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 244 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 245 gconfig.h hertz.h
41b49281 246hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
247 gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h ../bfd/config.h \
248 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
066c2a57
JM
249 $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h gconfig.h search_list.h \
250 source.h symtab.h corefile.h gmon_io.h gmon_out.h hist.h \
251 sym_ids.h utils.h
ba323545 252source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 253 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 254 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 255 gconfig.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61 256 $(INCDIR)/filenames.h search_list.h source.h
41b49281 257search_list.o: search_list.c $(INCDIR)/libiberty.h \
92f01d61
JM
258 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
259 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
260 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 261 gconfig.h search_list.h
ba323545 262symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 263 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 264 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 265 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 266 corefile.h
41b49281 267sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
92f01d61
JM
268 $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
269 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
270 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 271 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 272 sym_ids.h
bfa36442 273utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
92f01d61
JM
274 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
275 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
276 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 277 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 278 utils.h
ba323545 279i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 280 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 281 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 282 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 283 corefile.h hist.h
ba323545 284alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 285 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 286 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 287 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 288 corefile.h hist.h
ba323545 289vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 290 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 291 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 292 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 293 corefile.h hist.h
ba323545 294tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 295 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 296 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 297 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 298 corefile.h hist.h
ba323545 299sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 300 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 301 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 302 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 303 corefile.h hist.h
ba323545 304mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
ec0806ec 305 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
92f01d61 306 ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
066c2a57 307 gconfig.h search_list.h source.h symtab.h cg_arcs.h \
92f01d61 308 corefile.h hist.h
3099538b
AM
309flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
310bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
311fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
41b49281 312# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.295122 seconds and 4 git commands to generate.