* gmon_io.c (gmon_io_read, gmon_io_write_vma,
[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 AM_CFLAGS = $(WARN_CFLAGS)
15
16 MKDEP = gcc -MM
17
18 INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -I$(srcdir)/../intl -I../intl -I. -DLOCALEDIR="\"$(prefix)/share/locale\""
19
20 bin_PROGRAMS = gprof
21
22 ## Convenience var listing pure sources.
23 sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
24         cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
25         search_list.c symtab.c sym_ids.c utils.c \
26         i386.c alpha.c vax.c tahoe.c sparc.c
27 gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
28 gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLDEPS)
29 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(INTLLIBS)
30
31 noinst_HEADERS = \
32         basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
33         corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
34         search_list.h source.h sym_ids.h symtab.h utils.h
35
36 EXTRA_DIST = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c bbconv.pl
37
38 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
39
40 diststuff: $(BUILT_SOURCES) info
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 file in $(POTFILES); do echo $$file; done | 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 # Build the man page from the texinfo file
62 # The sed command removes the no-adjust Nroff command so that
63 # the man output looks standard.
64 $(srcdir)/gprof.1: $(srcdir)/gprof.texi
65         touch $(srcdir)/gprof.1
66         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
67         -($(POD2MAN) gprof.pod | \
68                 sed -e '/^.if n .na/d' > $(srcdir)/gprof.1.T$$$$ && \
69                 mv -f $(srcdir)/gprof.1.T$$$$ $(srcdir)/gprof.1) || \
70                 (rm -f $(srcdir)/gprof.1.T$$$$ && exit 1)
71         rm -f gprof.pod
72
73 # Targets to rebuild dependencies in this Makefile.
74 # Have to get rid of DEP1 here so that "$?" later includes all sources.
75 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
76         rm -f DEP1
77         $(MAKE) MKDEP="$(MKDEP)" DEP1
78         sed -f dep.sed < DEP1 > DEPA
79         echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
80         if grep ' /' DEPA > /dev/null 2> /dev/null; then \
81           echo 'make DEP failed!'; exit 1; \
82         else \
83           mv -f DEPA $@; \
84         fi
85
86 DEP1: $(gprof_SOURCES)
87         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
88         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
89         $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
90         mv -f DEP2 $@
91
92 dep.sed: dep-in.sed config.status
93         objdir=`pwd`; \
94         sed <$(srcdir)/dep-in.sed >dep.sed      \
95                 -e 's!@INCDIR@!$(INCDIR)!'      \
96                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
97                 -e 's!@SRCDIR@!$(srcdir)!'      \
98                 -e "s!@OBJDIR@!$${objdir}!"
99
100 dep: DEP
101         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
102         cat DEP >> tmp-Makefile
103         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
104
105 dep-in: DEP
106         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
107         cat DEP >> tmp-Makefile.in
108         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
109
110 dep-am: DEP
111         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
112         cat DEP >> tmp-Makefile.am
113         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
114
115 .PHONY: dep dep-in dep-am
116
117 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
118
119 # DO NOT DELETE THIS LINE -- mkdep uses it.
120 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
121 basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \
122   $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \
123   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
124   $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \
125   ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
126   $(INCDIR)/libiberty.h sym_ids.h
127 call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
128   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
129   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
130   symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \
131   corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h
132 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
133   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
134   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
135   call_graph.h symtab.h ../bfd/bfd.h source.h search_list.h \
136   cg_arcs.h cg_dfn.h cg_print.h utils.h sym_ids.h
137 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
138   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
139   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
140   cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
141   cg_dfn.h utils.h
142 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
143   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
144   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
145   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
146   search_list.h cg_print.h hist.h utils.h
147 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
148   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
149   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
150   corefile.h ../bfd/bfd.h symtab.h source.h search_list.h
151 gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
152   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
153   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
154   symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \
155   corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \
156   hertz.h hist.h $(INCDIR)/libiberty.h
157 gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
158   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
159   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
160   $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
161   symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
162   corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h \
163   $(INCDIR)/demangle.h
164 hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
165   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
166   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h
167 hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
168   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
169   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
170   corefile.h ../bfd/bfd.h gmon_io.h gmon.h gmon_out.h \
171   hist.h symtab.h source.h search_list.h sym_ids.h utils.h
172 source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
173   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
174   gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \
175   search_list.h source.h
176 search_list.o: search_list.c $(INCDIR)/libiberty.h \
177   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
178   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
179   $(INCDIR)/bin-bugs.h search_list.h
180 symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
181   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
182   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
183   source.h search_list.h corefile.h
184 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
185   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
186   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
187   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
188   search_list.h sym_ids.h
189 utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
190   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
191   $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
192   source.h search_list.h
193 i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
194   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
195   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
196   source.h search_list.h corefile.h hist.h
197 alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
198   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
199   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
200   source.h search_list.h corefile.h hist.h
201 vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
202   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
203   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
204   source.h search_list.h corefile.h hist.h
205 tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
206   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
207   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
208   source.h search_list.h corefile.h hist.h
209 sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
210   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
211   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
212   source.h search_list.h corefile.h hist.h
213 flat_bl.o: flat_bl.c
214 bsd_callg_bl.o: bsd_callg_bl.c
215 fsf_callg_bl.o: fsf_callg_bl.c
216 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY