* doc/binutils.texi: Include config.texi and @file documentation
[external/binutils.git] / gprof / Makefile.am
1 ## Process this file with automake to generate Makefile.in
2
3 AUTOMAKE_OPTIONS = cygnus
4
5 SUFFIXES = .m
6
7 SUBDIRS = po
8
9 BASEDIR = $(srcdir)/..
10 BFDDIR = $(BASEDIR)/bfd
11 INCDIR  = $(BASEDIR)/include
12
13 WARN_CFLAGS = @WARN_CFLAGS@
14 NO_WERROR = @NO_WERROR@
15 AM_CFLAGS = $(WARN_CFLAGS)
16
17 MKDEP = gcc -MM
18
19 INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(datadir)/locale\""
20
21 bin_PROGRAMS = gprof
22
23 ## Convenience var listing pure sources.
24 sources = 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 \
27         i386.c alpha.c vax.c tahoe.c sparc.c mips.c
28 gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
29 gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS)
30 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS)
31
32 noinst_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
37 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
38 EXTRA_DIST    = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
39
40 diststuff: $(BUILT_SOURCES) info $(man_MANS)
41
42 .m.c:
43         awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
44             FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
45             FILE=$*.m $(srcdir)/$*.m
46
47 POTFILES = $(sources) $(noinst_HEADERS)
48 po/POTFILES.in: @MAINT@ Makefile
49         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
50           && mv tmp $(srcdir)/po/POTFILES.in
51
52 MANCONF  = -Dman
53
54 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
55
56 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
57
58 info_TEXINFOS = gprof.texi
59 man_MANS = gprof.1
60
61 $(srcdir)/gprof.info: gprof.texi config.texi
62
63 config.texi:
64         echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
65
66 # Build the man page from the texinfo file
67 # The sed command removes the no-adjust Nroff command so that
68 # the man output looks standard.
69 gprof.1: $(srcdir)/gprof.texi config.texi
70         touch $@
71         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
72         -($(POD2MAN) gprof.pod | \
73                sed -e '/^.if n .na/d' > $@.T$$$$ && \
74                mv -f $@.T$$$$ $@) || \
75                (rm -f $@.T$$$$ && exit 1)
76         rm -f gprof.pod
77
78 Makefile: $(BFDDIR)/configure.in
79
80 # We want install to imply install-info as per GNU standards, despite the
81 # cygnus option.
82 install-data-local: install-info
83
84 # Targets to rebuild dependencies in this Makefile.
85 # Have to get rid of DEP1 here so that "$?" later includes all sources.
86 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
87         rm -f DEP1
88         $(MAKE) MKDEP="$(MKDEP)" DEP1
89         sed -f dep.sed < DEP1 > DEPA
90         echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
91         if grep ' /' DEPA > /dev/null 2> /dev/null; then \
92           echo 'make DEP failed!'; exit 1; \
93         else \
94           mv -f DEPA $@; \
95         fi
96
97 DEP1: $(gprof_SOURCES)
98         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
99         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
100         $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
101         mv -f DEP2 $@
102
103 dep.sed: dep-in.sed config.status
104         objdir=`pwd`; \
105         sed <$(srcdir)/dep-in.sed >dep.sed      \
106                 -e 's!@INCDIR@!$(INCDIR)!'      \
107                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
108                 -e 's!@SRCDIR@!$(srcdir)!'      \
109                 -e "s!@OBJDIR@!$${objdir}!"     \
110                 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
111
112 dep: DEP
113         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
114         cat DEP >> tmp-Makefile
115         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
116
117 dep-in: DEP
118         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
119         cat DEP >> tmp-Makefile.in
120         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
121
122 dep-am: DEP
123         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
124         cat DEP >> tmp-Makefile.am
125         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
126
127 .PHONY: dep dep-in dep-am
128
129 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
130
131 # DO NOT DELETE THIS LINE -- mkdep uses it.
132 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
133 basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
134   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
135   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
136   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h basic_blocks.h \
137   corefile.h gmon_io.h gmon_out.h search_list.h source.h \
138   symtab.h sym_ids.h
139 call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
140   $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
141   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
142   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
143   symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
144   gmon_out.h sym_ids.h
145 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
146   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
147   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
148   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
149   symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
150   utils.h sym_ids.h
151 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
152   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
153   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
154   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
155   symtab.h cg_arcs.h cg_dfn.h utils.h
156 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
157   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
158   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
159   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
160   symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
161 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
162   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
163   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
164   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
165   symtab.h corefile.h
166 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
167   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
168   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
169   search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
170   corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
171   hertz.h hist.h $(INCDIR)/libiberty.h
172 gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
173   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
174   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
175   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
176   symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
177   corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
178 hertz.o: hertz.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
179   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
180   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
181   hertz.h
182 hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
183   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
184   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
185   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
186   symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
187   utils.h
188 source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
189   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
190   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
191   $(INCDIR)/libiberty.h search_list.h source.h
192 search_list.o: search_list.c $(INCDIR)/libiberty.h \
193   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
194   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
195   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h
196 symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
197   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
198   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
199   search_list.h source.h symtab.h cg_arcs.h corefile.h
200 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
201   $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
202   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
203   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
204   source.h symtab.h cg_arcs.h sym_ids.h
205 utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
206   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
207   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
208   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
209   source.h symtab.h cg_arcs.h utils.h
210 i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
211   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
212   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
213   search_list.h source.h symtab.h cg_arcs.h corefile.h \
214   hist.h
215 alpha.o: alpha.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 corefile.h \
219   hist.h
220 vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
221   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
222   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
223   search_list.h source.h symtab.h cg_arcs.h corefile.h \
224   hist.h
225 tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
226   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
227   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
228   search_list.h source.h symtab.h cg_arcs.h corefile.h \
229   hist.h
230 sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
231   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
232   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
233   search_list.h source.h symtab.h cg_arcs.h corefile.h \
234   hist.h
235 mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
236   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
237   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
238   search_list.h source.h symtab.h cg_arcs.h corefile.h \
239   hist.h
240 flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
241 bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
242 fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
243 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY