2076-01-11 H.J. Lu <hongjiu.lu@intel.com>
[binutils.git] / gprof / Makefile.am
blobba93be11ee5f786f2c22faa78e7bb8f88ab6fc6c
1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
5 SUFFIXES = .m
7 SUBDIRS = po
9 BASEDIR = $(srcdir)/..
10 BFDDIR = $(BASEDIR)/bfd
11 INCDIR  = $(BASEDIR)/include
13 WARN_CFLAGS = @WARN_CFLAGS@
14 NO_WERROR = @NO_WERROR@
15 AM_CFLAGS = $(WARN_CFLAGS)
17 MKDEP = gcc -MM
19 INCLUDES = -D_GNU_SOURCE -DDEBUG -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd @INCINTL@ -I. -DLOCALEDIR="\"$(datadir)/locale\""
21 bin_PROGRAMS = gprof
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 $(LIBINTL_DEP)
30 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
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
37 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
38 EXTRA_DIST    = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
40 diststuff: $(BUILT_SOURCES) info $(man_MANS)
42 # This empty rule is a hack against gmake patched by Apple.
43 %.o:%.m
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
50 POTFILES = $(sources) $(noinst_HEADERS)
51 po/POTFILES.in: @MAINT@ Makefile
52         for f in $(POTFILES); do echo $$f; done | LC_COLLATE= sort > tmp \
53           && mv tmp $(srcdir)/po/POTFILES.in
55 MANCONF  = -Dman
57 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl
59 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
61 info_TEXINFOS = gprof.texi
62 gprof_TEXINFOS = config.texi
63 man_MANS = gprof.1
65 config.texi:
66         echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
68 # Build the man page from the texinfo file
69 # The sed command removes the no-adjust Nroff command so that
70 # the man output looks standard.
71 gprof.1: $(srcdir)/gprof.texi config.texi
72         touch $@
73         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
74         -($(POD2MAN) gprof.pod | \
75                sed -e '/^.if n .na/d' > $@.T$$$$ && \
76                mv -f $@.T$$$$ $@) || \
77                (rm -f $@.T$$$$ && exit 1)
78         rm -f gprof.pod
80 .PHONY: install-html install-html-am install-html-recursive
82 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
84 install-html: install-html-recursive  install-html-am
86 install-html-am: $(HTMLS)
87         @$(NORMAL_INSTALL)
88         test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
89         @list='$(HTMLS)'; for p in $$list; do \
90           if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
91           f=$(html__strip_dir) \
92           if test -d "$$d$$p"; then \
93             echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
94             $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
95             echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
96             $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
97           else \
98             echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
99             $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
100           fi; \
101         done
103 install-html-recursive:
104         @failcom='exit 1'; \
105         for f in x $$MAKEFLAGS; do \
106           case $$f in \
107             *=* | --[!k]*);; \
108             *k*) failcom='fail=yes';; \
109           esac; \
110         done; \
111         dot_seen=no; \
112         target=`echo $@ | sed s/-recursive//`; \
113         list='$(SUBDIRS)'; for subdir in $$list; do \
114           echo "Making $$target in $$subdir"; \
115           if test "$$subdir" = "."; then \
116             dot_seen=yes; \
117             local_target="$$target-am"; \
118           else \
119             local_target="$$target"; \
120           fi; \
121           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
122           || eval $$failcom; \
123         done; \
124         if test "$$dot_seen" = "no"; then \
125           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
126         fi; test -z "$$fail"
128 # We want install to imply install-info as per GNU standards, despite the
129 # cygnus option.
130 install-data-local: install-info
132 # Targets to rebuild dependencies in this Makefile.
133 # Have to get rid of DEP1 here so that "$?" later includes all sources.
134 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
135         rm -f DEP1
136         $(MAKE) MKDEP="$(MKDEP)" DEP1
137         sed -f dep.sed < DEP1 > DEPA
138         echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA
139         if grep ' /' DEPA > /dev/null 2> /dev/null; then \
140           echo 'make DEP failed!'; exit 1; \
141         else \
142           mv -f DEPA $@; \
143         fi
145 DEP1: $(gprof_SOURCES)
146         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
147         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
148         $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
149         mv -f DEP2 $@
151 dep.sed: dep-in.sed config.status
152         objdir=`pwd`; \
153         sed <$(srcdir)/dep-in.sed >dep.sed      \
154                 -e 's!@INCDIR@!$(INCDIR)!'      \
155                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
156                 -e 's!@SRCDIR@!$(srcdir)!'      \
157                 -e "s!@OBJDIR@!$${objdir}!"     \
158                 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
160 dep: DEP
161         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
162         cat DEP >> tmp-Makefile
163         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
165 dep-in: DEP
166         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
167         cat DEP >> tmp-Makefile.in
168         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
170 dep-am: DEP
171         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
172         cat DEP >> tmp-Makefile.am
173         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
175 .PHONY: dep dep-in dep-am
177 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
179 MAINTAINERCLEANFILES = gprof.info
181 # Automake 1.9 will only build info files in the objdir if they are
182 # mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
183 # though, so we use a bogus condition.
184 if GENINSRC_NEVER
185 DISTCLEANFILES = gprof.info
186 endif
188 # DO NOT DELETE THIS LINE -- mkdep uses it.
189 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
190 basic_blocks.o: basic_blocks.c $(INCDIR)/libiberty.h \
191   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
192   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
193   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h basic_blocks.h \
194   corefile.h gmon_io.h gmon_out.h search_list.h source.h \
195   symtab.h sym_ids.h
196 call_graph.o: call_graph.c gprof.h $(BFDDIR)/sysdep.h \
197   $(INCDIR)/ansidecl.h ../bfd/config.h $(INCDIR)/fopen-same.h \
198   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
199   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
200   symtab.h cg_arcs.h call_graph.h corefile.h gmon_io.h \
201   gmon_out.h sym_ids.h
202 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
203   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
204   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
205   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
206   symtab.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
207   utils.h sym_ids.h
208 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
209   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
210   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
211   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
212   symtab.h cg_arcs.h cg_dfn.h utils.h
213 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
214   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
215   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
216   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
217   symtab.h cg_arcs.h cg_print.h hist.h utils.h corefile.h
218 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
219   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
220   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
221   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
222   symtab.h corefile.h
223 gmon_io.o: gmon_io.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
224   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
225   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
226   search_list.h source.h symtab.h cg_arcs.h basic_blocks.h \
227   corefile.h call_graph.h gmon_io.h gmon_out.h gmon.h \
228   hertz.h hist.h $(INCDIR)/libiberty.h
229 gprof.o: gprof.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
230   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
231   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
232   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
233   symtab.h basic_blocks.h call_graph.h cg_arcs.h cg_print.h \
234   corefile.h gmon_io.h hertz.h hist.h sym_ids.h $(INCDIR)/demangle.h
235 hertz.o: hertz.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   hertz.h
239 hist.o: hist.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
240   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
241   $(INCDIR)/filenames.h ../bfd/bfd.h $(INCDIR)/symcat.h \
242   gconfig.h $(INCDIR)/bin-bugs.h search_list.h source.h \
243   symtab.h corefile.h gmon_io.h gmon_out.h hist.h sym_ids.h \
244   utils.h
245 source.o: source.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
246   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
247   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
248   $(INCDIR)/libiberty.h search_list.h source.h
249 search_list.o: search_list.c $(INCDIR)/libiberty.h \
250   $(INCDIR)/ansidecl.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 symtab.o: symtab.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
254   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
255   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
256   search_list.h source.h symtab.h cg_arcs.h corefile.h
257 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
258   $(INCDIR)/safe-ctype.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
259   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
260   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
261   source.h symtab.h cg_arcs.h sym_ids.h
262 utils.o: utils.c $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
263   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
264   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h ../bfd/bfd.h \
265   $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h search_list.h \
266   source.h symtab.h cg_arcs.h utils.h
267 i386.o: i386.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
268   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
269   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
270   search_list.h source.h symtab.h cg_arcs.h corefile.h \
271   hist.h
272 alpha.o: alpha.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
273   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
274   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
275   search_list.h source.h symtab.h cg_arcs.h corefile.h \
276   hist.h
277 vax.o: vax.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
278   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
279   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
280   search_list.h source.h symtab.h cg_arcs.h corefile.h \
281   hist.h
282 tahoe.o: tahoe.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
283   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
284   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
285   search_list.h source.h symtab.h cg_arcs.h corefile.h \
286   hist.h
287 sparc.o: sparc.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
288   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
289   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
290   search_list.h source.h symtab.h cg_arcs.h corefile.h \
291   hist.h
292 mips.o: mips.c gprof.h $(BFDDIR)/sysdep.h $(INCDIR)/ansidecl.h \
293   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
294   ../bfd/bfd.h $(INCDIR)/symcat.h gconfig.h $(INCDIR)/bin-bugs.h \
295   search_list.h source.h symtab.h cg_arcs.h corefile.h \
296   hist.h
297 flat_bl.o: flat_bl.c $(INCDIR)/ansidecl.h
298 bsd_callg_bl.o: bsd_callg_bl.c $(INCDIR)/ansidecl.h
299 fsf_callg_bl.o: fsf_callg_bl.c $(INCDIR)/ansidecl.h
300 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY