*** 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
32118081 19INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(datadir)/locale\""
252b5132
RH
20
21bin_PROGRAMS = gprof
22
23## Convenience var listing pure sources.
24sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
25 cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
26 search_list.c symtab.c sym_ids.c utils.c \
ec0806ec 27 i386.c alpha.c vax.c tahoe.c sparc.c mips.c
252b5132
RH
28gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
29gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS)
30gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS)
31
32noinst_HEADERS = \
33 basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
34 corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
35 search_list.h source.h sym_ids.h symtab.h utils.h
36
252b5132 37BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
c45021f2 38EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
252b5132 39
c45021f2 40diststuff: $(BUILT_SOURCES) info $(man_MANS)
252b5132 41
253a2395
NC
42# This empty rule is a hack against gmake patched by Apple.
43%.o:%.m
44
252b5132
RH
45.m.c:
46 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
47 FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
48 FILE=$*.m $(srcdir)/$*.m
49
50POTFILES = $(sources) $(noinst_HEADERS)
51po/POTFILES.in: @MAINT@ Makefile
68cdbb4a 52 for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
252b5132
RH
53 && mv tmp $(srcdir)/po/POTFILES.in
54
40f90528
AM
55MANCONF = -Dman
56
57TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
58
59POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
60
252b5132
RH
61info_TEXINFOS = gprof.texi
62man_MANS = gprof.1
63
dff70155
MM
64$(srcdir)/gprof.info: gprof.texi config.texi
65
66config.texi:
67 echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
68
40f90528
AM
69# Build the man page from the texinfo file
70# The sed command removes the no-adjust Nroff command so that
71# the man output looks standard.
dff70155 72gprof.1: $(srcdir)/gprof.texi config.texi
c45021f2 73 touch $@
40f90528
AM
74 -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
75 -($(POD2MAN) gprof.pod | \
c45021f2
NC
76 sed -e '/^.if n .na/d' > $@.T$$$$ && \
77 mv -f $@.T$$$$ $@) || \
78 (rm -f $@.T$$$$ && exit 1)
40f90528
AM
79 rm -f gprof.pod
80
108a6f8e
CD
81.PHONY: install-html install-html-am install-html-recursive
82
83html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
84
85install-html: install-html-recursive install-html-am
86
87install-html-am: $(HTMLS)
88 @$(NORMAL_INSTALL)
89 test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
90 @list='$(HTMLS)'; for p in $$list; do \
91 if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
92 f=$(html__strip_dir) \
93 if test -d "$$d$$p"; then \
94 echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
95 $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
96 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
97 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
98 else \
99 echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
100 $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
101 fi; \
102 done
103
104install-html-recursive:
105 @failcom='exit 1'; \
106 for f in x $$MAKEFLAGS; do \
107 case $$f in \
108 *=* | --[!k]*);; \
109 *k*) failcom='fail=yes';; \
110 esac; \
111 done; \
112 dot_seen=no; \
113 target=`echo $@ | sed s/-recursive//`; \
114 list='$(SUBDIRS)'; for subdir in $$list; do \
115 echo "Making $$target in $$subdir"; \
116 if test "$$subdir" = "."; then \
117 dot_seen=yes; \
118 local_target="$$target-am"; \
119 else \
120 local_target="$$target"; \
121 fi; \
122 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
123 || eval $$failcom; \
124 done; \
125 if test "$$dot_seen" = "no"; then \
126 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
127 fi; test -z "$$fail"
128
cd8e197b
HPN
129# We want install to imply install-info as per GNU standards, despite the
130# cygnus option.
6bf9431b 131install-data-local: install-info
cd8e197b 132
41b49281
AM
133# Targets to rebuild dependencies in this Makefile.
134# Have to get rid of DEP1 here so that "$?" later includes all sources.
135DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
136 rm -f DEP1
137 $(MAKE) MKDEP="$(MKDEP)" DEP1
0bdaf48b
AM
138 sed -f dep.sed < DEP1 > DEPA
139 echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
140 if grep ' /' DEPA > /dev/null 2> /dev/null; then \
1581f8c9
AM
141 echo 'make DEP failed!'; exit 1; \
142 else \
0bdaf48b 143 mv -f DEPA $@; \
1581f8c9 144 fi
41b49281
AM
145
146DEP1: $(gprof_SOURCES)
147 echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
148 echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
149 $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
150 mv -f DEP2 $@
151
152dep.sed: dep-in.sed config.status
153 objdir=`pwd`; \
154 sed <$(srcdir)/dep-in.sed >dep.sed \
155 -e 's!@INCDIR@!$(INCDIR)!' \
156 -e 's!@BFDDIR@!$(BFDDIR)!' \
157 -e 's!@SRCDIR@!$(srcdir)!' \
8e42bcb6
AM
158 -e "s!@OBJDIR@!$${objdir}!" \
159 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
41b49281
AM
160
161dep: DEP
162 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
163 cat DEP >> tmp-Makefile
164 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
165
166dep-in: DEP
167 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
168 cat DEP >> tmp-Makefile.in
169 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
170
171dep-am: DEP
172 sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
173 cat DEP >> tmp-Makefile.am
174 $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
175
176.PHONY: dep dep-in dep-am
177
0bdaf48b 178CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
41b49281
AM
179
180# DO NOT DELETE THIS LINE -- mkdep uses it.
181# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
ba323545
AM
182basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
183 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
184 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
185 $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h basic_blocks.h \
186 corefile.h gmon_io.h gmon_out.h search_list.h source.h \
187 symtab.h sym_ids.h
188call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
189 $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
190 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
191 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
192 symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
193 gmon_out.h sym_ids.h
41b49281
AM
194cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
195 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
ba323545
AM
196 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
197 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
198 symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
7997656a 199 utils.h sym_ids.h
41b49281
AM
200cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
201 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
ba323545
AM
202 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
203 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
204 symtab.h cg_arcs.h cg_dfn.h utils.h
41b49281 205cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ba323545
AM
206 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
207 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
208 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
66477e87 209 symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
41b49281
AM
210corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
211 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
ba323545
AM
212 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
213 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
214 symtab.h corefile.h
215gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
216 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
217 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
218 search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
219 corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
220 hertz.h hist.h $(INCDIR)/libiberty.h
6f53ec68
AM
221gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
222 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
223 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
224 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
225 symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
226 corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
ba323545
AM
227hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
228 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
229 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
230 hertz.h
41b49281
AM
231hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
232 gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
ba323545
AM
233 $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
234 gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
235 symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
236 utils.h
237source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 238 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
239 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
240 $(INCDIR)/libiberty.h search_list.h source.h
41b49281
AM
241search_list.o: search_list.c $(INCDIR)/libiberty.h \
242 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
ba323545
AM
243 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
244 $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h
245symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 246 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
247 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
248 search_list.h source.h symtab.h cg_arcs.h corefile.h
41b49281 249sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ba323545
AM
250 $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
251 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
252 $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
253 source.h symtab.h cg_arcs.h sym_ids.h
bfa36442
AM
254utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
255 $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
256 $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
257 $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
258 source.h symtab.h cg_arcs.h utils.h
ba323545 259i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 260 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
261 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
262 search_list.h source.h symtab.h cg_arcs.h corefile.h \
7997656a 263 hist.h
ba323545 264alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 265 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
266 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
267 search_list.h source.h symtab.h cg_arcs.h corefile.h \
7997656a 268 hist.h
ba323545 269vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 270 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
271 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
272 search_list.h source.h symtab.h cg_arcs.h corefile.h \
7997656a 273 hist.h
ba323545 274tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 275 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
276 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
277 search_list.h source.h symtab.h cg_arcs.h corefile.h \
7997656a 278 hist.h
ba323545 279sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
2114f57b 280 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
281 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
282 search_list.h source.h symtab.h cg_arcs.h corefile.h \
7997656a 283 hist.h
ba323545 284mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
ec0806ec 285 ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
ba323545
AM
286 ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
287 search_list.h source.h symtab.h cg_arcs.h corefile.h \
ec0806ec 288 hist.h
3099538b
AM
289flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
290bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
291fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
41b49281 292# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
This page took 0.314431 seconds and 4 git commands to generate.