bfd/
[binutils.git] / gprof / Makefile.am
blob12d794beedb9cd31e8e4828fd18d603cdbb5319a
1 ## Process this file with automake to generate Makefile.in
3 AUTOMAKE_OPTIONS = cygnus
4 ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
6 SUFFIXES = .m
8 SUBDIRS = po
10 BASEDIR = $(srcdir)/..
11 BFDDIR = $(BASEDIR)/bfd
12 INCDIR  = $(BASEDIR)/include
14 WARN_CFLAGS = @WARN_CFLAGS@
15 NO_WERROR = @NO_WERROR@
16 AM_CFLAGS = $(WARN_CFLAGS)
18 MKDEP = gcc -MM
20 INCLUDES = -DDEBUG -I../bfd -I$(srcdir)/../include \
21         -I$(srcdir)/../bfd @INCINTL@ -I. \
22         -DLOCALEDIR="\"$(datadir)/locale\""
24 bin_PROGRAMS = gprof
26 ## Convenience var listing pure sources.
27 sources = basic_blocks.c call_graph.c cg_arcs.c cg_dfn.c \
28         cg_print.c corefile.c gmon_io.c gprof.c hertz.c hist.c source.c \
29         search_list.c symtab.c sym_ids.c utils.c \
30         i386.c alpha.c vax.c tahoe.c sparc.c mips.c
31 gprof_SOURCES = $(sources) flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
32 gprof_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL_DEP)
33 gprof_LDADD = ../bfd/libbfd.la ../libiberty/libiberty.a $(LIBINTL)
35 noinst_HEADERS = \
36         basic_blocks.h call_graph.h cg_arcs.h cg_dfn.h cg_print.h \
37         corefile.h gmon.h gmon_io.h gmon_out.h gprof.h hertz.h hist.h \
38         search_list.h source.h sym_ids.h symtab.h utils.h
40 BUILT_SOURCES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
41 EXTRA_DIST    = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
43 diststuff: $(BUILT_SOURCES) info $(man_MANS)
45 # This empty rule is a hack against gmake patched by Apple.
46 %.o:%.m
48 .m.c:
49         awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
50             FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
51             FILE=$*.m $(srcdir)/$*.m
53 POTFILES = $(sources) $(noinst_HEADERS)
54 po/POTFILES.in: @MAINT@ Makefile
55         for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
56           && mv tmp $(srcdir)/po/POTFILES.in
58 MANCONF  = -Dman
60 TEXI2POD = perl $(srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
62 POD2MAN = pod2man --center="GNU" --release="binutils-$(VERSION)" --section=1
64 info_TEXINFOS = gprof.texi
65 gprof_TEXINFOS = config.texi
66 man_MANS = gprof.1
68 AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
69 TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../bfd/doc" -I ../bfd/doc
71 config.texi:
72         echo "@set top_srcdir $(top_srcdir)" >> ./config.texi
74 # Build the man page from the texinfo file
75 # The sed command removes the no-adjust Nroff command so that
76 # the man output looks standard.
77 gprof.1: $(srcdir)/gprof.texi config.texi
78         touch $@
79         -$(TEXI2POD) $(MANCONF) -Dgprof < $(srcdir)/gprof.texi > gprof.pod
80         -($(POD2MAN) gprof.pod | \
81                sed -e '/^.if n .na/d' > $@.T$$$$ && \
82                mv -f $@.T$$$$ $@) || \
83                (rm -f $@.T$$$$ && exit 1)
84         rm -f gprof.pod
86 .PHONY: install-pdf install-pdf-am install-pdf-recursive
88 pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
90 install-pdf: install-pdf-recursive install-pdf-am
92 install-pdf-am: $(PDFS)
93         @$(NORMAL_INSTALL)
94         test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
95         @list='$(PDFS)'; for p in $$list; do \
96           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
97           f=$(pdf__strip_dir) \
98           echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
99           $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
100         done
102 install-pdf-recursive:
103         @failcom='exit 1'; \
104         for f in x $$MAKEFLAGS; do \
105           case $$f in \
106             *=* | --[!k]*);; \
107             *k*) failcom='fail=yes';; \
108           esac; \
109         done; \
110         dot_seen=no; \
111         target=`echo $@ | sed s/-recursive//`; \
112         list='$(SUBDIRS)'; for subdir in $$list; do \
113           echo "Making $$target in $$subdir"; \
114           if test "$$subdir" = "."; then \
115             dot_seen=yes; \
116             local_target="$$target-am"; \
117           else \
118             local_target="$$target"; \
119           fi; \
120           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
121           || eval $$failcom; \
122         done; \
123         if test "$$dot_seen" = "no"; then \
124           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
125         fi; test -z "$$fail"
127 .PHONY: install-html install-html-am install-html-recursive
129 html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
131 install-html: install-html-recursive  install-html-am
133 install-html-am: $(HTMLS)
134         @$(NORMAL_INSTALL)
135         test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
136         @list='$(HTMLS)'; for p in $$list; do \
137           if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \
138           f=$(html__strip_dir) \
139           if test -d "$$d$$p"; then \
140             echo " $(mkdir_p) '$(DESTDIR)$(htmldir)/$$f'"; \
141             $(mkdir_p) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
142             echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
143             $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
144           else \
145             echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
146             $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
147           fi; \
148         done
150 install-html-recursive:
151         @failcom='exit 1'; \
152         for f in x $$MAKEFLAGS; do \
153           case $$f in \
154             *=* | --[!k]*);; \
155             *k*) failcom='fail=yes';; \
156           esac; \
157         done; \
158         dot_seen=no; \
159         target=`echo $@ | sed s/-recursive//`; \
160         list='$(SUBDIRS)'; for subdir in $$list; do \
161           echo "Making $$target in $$subdir"; \
162           if test "$$subdir" = "."; then \
163             dot_seen=yes; \
164             local_target="$$target-am"; \
165           else \
166             local_target="$$target"; \
167           fi; \
168           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
169           || eval $$failcom; \
170         done; \
171         if test "$$dot_seen" = "no"; then \
172           $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
173         fi; test -z "$$fail"
175 # We want install to imply install-info as per GNU standards, despite the
176 # cygnus option.
177 install-data-local: install-info
179 # Targets to rebuild dependencies in this Makefile.
180 # Have to get rid of DEP1 here so that "$?" later includes all sources.
181 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
182         rm -f DEP1
183         $(MAKE) MKDEP="$(MKDEP)" DEP1
184         echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEP1
185         if grep ' /' DEP1 > /dev/null 2> /dev/null; then \
186           echo 'make DEP failed!'; exit 1; \
187         else \
188           mv -f DEP1 $@; \
189         fi
191 DEP1: $(gprof_SOURCES)
192         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
193         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
194         for f in $?; do \
195           $(MKDEP) $(INCLUDES) $(CFLAGS) $$f > DEPA; \
196           sed -n -e '1s/: .*/: \\/p' -e q < DEPA >> DEP2; \
197           sed -e '1s/.*: //' -f dep.sed < DEPA | \
198             LC_ALL=C sort | LC_ALL=C uniq | \
199             sed -e 's/^[AB]/  /' -e '$$s/ \\$$//' >> DEP2; \
200         done
201         rm -f DEPA
202         mv -f DEP2 $@
204 dep.sed: dep-in.sed config.status
205         objdir=`pwd`; \
206         sed <$(srcdir)/dep-in.sed >dep.sed      \
207                 -e 's!@INCDIR@!$(INCDIR)!'      \
208                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
209                 -e 's!@SRCDIR@!$(srcdir)!'      \
210                 -e "s!@OBJDIR@!$${objdir}!"     \
211                 -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/gprof$$,,`'!'
213 dep: DEP
214         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
215         cat DEP >> tmp-Makefile
216         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
218 dep-in: DEP
219         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
220         cat DEP >> tmp-Makefile.in
221         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
223 dep-am: DEP
224         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
225         cat DEP >> tmp-Makefile.am
226         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
228 .PHONY: dep dep-in dep-am
230 CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
232 MAINTAINERCLEANFILES = gprof.info
234 # Automake 1.9 will only build info files in the objdir if they are
235 # mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
236 # though, so we use a bogus condition.
237 if GENINSRC_NEVER
238 DISTCLEANFILES = gprof.info
239 endif
241 # DO NOT DELETE THIS LINE -- mkdep uses it.
242 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
243 basic_blocks.o: \
244   basic_blocks.c \
245   $(BFDDIR)/sysdep.h \
246   $(INCDIR)/ansidecl.h \
247   $(INCDIR)/filenames.h \
248   $(INCDIR)/fopen-same.h \
249   $(INCDIR)/libiberty.h \
250   $(INCDIR)/symcat.h \
251   ../bfd/bfd.h \
252   ../bfd/config.h \
253   basic_blocks.h \
254   corefile.h \
255   gconfig.h \
256   gmon_io.h \
257   gmon_out.h \
258   gprof.h \
259   search_list.h \
260   source.h \
261   sym_ids.h \
262   symtab.h
263 call_graph.o: \
264   call_graph.c \
265   $(BFDDIR)/sysdep.h \
266   $(INCDIR)/ansidecl.h \
267   $(INCDIR)/filenames.h \
268   $(INCDIR)/fopen-same.h \
269   $(INCDIR)/symcat.h \
270   ../bfd/bfd.h \
271   ../bfd/config.h \
272   call_graph.h \
273   cg_arcs.h \
274   corefile.h \
275   gconfig.h \
276   gmon_io.h \
277   gmon_out.h \
278   gprof.h \
279   search_list.h \
280   source.h \
281   sym_ids.h \
282   symtab.h
283 cg_arcs.o: \
284   cg_arcs.c \
285   $(BFDDIR)/sysdep.h \
286   $(INCDIR)/ansidecl.h \
287   $(INCDIR)/filenames.h \
288   $(INCDIR)/fopen-same.h \
289   $(INCDIR)/libiberty.h \
290   $(INCDIR)/symcat.h \
291   ../bfd/bfd.h \
292   ../bfd/config.h \
293   call_graph.h \
294   cg_arcs.h \
295   cg_dfn.h \
296   cg_print.h \
297   gconfig.h \
298   gprof.h \
299   search_list.h \
300   source.h \
301   sym_ids.h \
302   symtab.h \
303   utils.h
304 cg_dfn.o: \
305   cg_dfn.c \
306   $(BFDDIR)/sysdep.h \
307   $(INCDIR)/ansidecl.h \
308   $(INCDIR)/filenames.h \
309   $(INCDIR)/fopen-same.h \
310   $(INCDIR)/libiberty.h \
311   $(INCDIR)/symcat.h \
312   ../bfd/bfd.h \
313   ../bfd/config.h \
314   cg_arcs.h \
315   cg_dfn.h \
316   gconfig.h \
317   gprof.h \
318   search_list.h \
319   source.h \
320   symtab.h \
321   utils.h
322 cg_print.o: \
323   cg_print.c \
324   $(BFDDIR)/sysdep.h \
325   $(INCDIR)/ansidecl.h \
326   $(INCDIR)/filenames.h \
327   $(INCDIR)/fopen-same.h \
328   $(INCDIR)/libiberty.h \
329   $(INCDIR)/symcat.h \
330   ../bfd/bfd.h \
331   ../bfd/config.h \
332   cg_arcs.h \
333   cg_print.h \
334   corefile.h \
335   gconfig.h \
336   gprof.h \
337   hist.h \
338   search_list.h \
339   source.h \
340   symtab.h \
341   utils.h
342 corefile.o: \
343   corefile.c \
344   $(BFDDIR)/sysdep.h \
345   $(INCDIR)/ansidecl.h \
346   $(INCDIR)/filenames.h \
347   $(INCDIR)/fopen-same.h \
348   $(INCDIR)/libiberty.h \
349   $(INCDIR)/safe-ctype.h \
350   $(INCDIR)/symcat.h \
351   ../bfd/bfd.h \
352   ../bfd/config.h \
353   corefile.h \
354   gconfig.h \
355   gprof.h \
356   hist.h \
357   search_list.h \
358   source.h \
359   symtab.h
360 gmon_io.o: \
361   gmon_io.c \
362   $(BFDDIR)/sysdep.h \
363   $(INCDIR)/ansidecl.h \
364   $(INCDIR)/binary-io.h \
365   $(INCDIR)/filenames.h \
366   $(INCDIR)/fopen-same.h \
367   $(INCDIR)/libiberty.h \
368   $(INCDIR)/symcat.h \
369   ../bfd/bfd.h \
370   ../bfd/config.h \
371   basic_blocks.h \
372   call_graph.h \
373   cg_arcs.h \
374   corefile.h \
375   gconfig.h \
376   gmon.h \
377   gmon_io.h \
378   gmon_out.h \
379   gprof.h \
380   hertz.h \
381   hist.h \
382   search_list.h \
383   source.h \
384   symtab.h
385 gprof.o: \
386   gprof.c \
387   $(BFDDIR)/sysdep.h \
388   $(INCDIR)/ansidecl.h \
389   $(INCDIR)/demangle.h \
390   $(INCDIR)/filenames.h \
391   $(INCDIR)/fopen-same.h \
392   $(INCDIR)/libiberty.h \
393   $(INCDIR)/symcat.h \
394   ../bfd/bfd.h \
395   ../bfd/bfdver.h \
396   ../bfd/config.h \
397   basic_blocks.h \
398   call_graph.h \
399   cg_arcs.h \
400   cg_print.h \
401   corefile.h \
402   gconfig.h \
403   gmon_io.h \
404   gprof.h \
405   hertz.h \
406   hist.h \
407   search_list.h \
408   source.h \
409   sym_ids.h \
410   symtab.h
411 hertz.o: \
412   hertz.c \
413   $(BFDDIR)/sysdep.h \
414   $(INCDIR)/ansidecl.h \
415   $(INCDIR)/filenames.h \
416   $(INCDIR)/fopen-same.h \
417   $(INCDIR)/symcat.h \
418   ../bfd/bfd.h \
419   ../bfd/config.h \
420   gconfig.h \
421   gprof.h \
422   hertz.h
423 hist.o: \
424   hist.c \
425   $(BFDDIR)/sysdep.h \
426   $(INCDIR)/ansidecl.h \
427   $(INCDIR)/filenames.h \
428   $(INCDIR)/fopen-same.h \
429   $(INCDIR)/libiberty.h \
430   $(INCDIR)/symcat.h \
431   ../bfd/bfd.h \
432   ../bfd/config.h \
433   corefile.h \
434   gconfig.h \
435   gmon_io.h \
436   gmon_out.h \
437   gprof.h \
438   hist.h \
439   search_list.h \
440   source.h \
441   sym_ids.h \
442   symtab.h \
443   utils.h
444 source.o: \
445   source.c \
446   $(BFDDIR)/sysdep.h \
447   $(INCDIR)/ansidecl.h \
448   $(INCDIR)/filenames.h \
449   $(INCDIR)/fopen-same.h \
450   $(INCDIR)/libiberty.h \
451   $(INCDIR)/symcat.h \
452   ../bfd/bfd.h \
453   ../bfd/config.h \
454   gconfig.h \
455   gprof.h \
456   search_list.h \
457   source.h
458 search_list.o: \
459   search_list.c \
460   $(BFDDIR)/sysdep.h \
461   $(INCDIR)/ansidecl.h \
462   $(INCDIR)/filenames.h \
463   $(INCDIR)/fopen-same.h \
464   $(INCDIR)/libiberty.h \
465   $(INCDIR)/symcat.h \
466   ../bfd/bfd.h \
467   ../bfd/config.h \
468   gconfig.h \
469   gprof.h \
470   search_list.h
471 symtab.o: \
472   symtab.c \
473   $(BFDDIR)/sysdep.h \
474   $(INCDIR)/ansidecl.h \
475   $(INCDIR)/filenames.h \
476   $(INCDIR)/fopen-same.h \
477   $(INCDIR)/symcat.h \
478   ../bfd/bfd.h \
479   ../bfd/config.h \
480   cg_arcs.h \
481   corefile.h \
482   gconfig.h \
483   gprof.h \
484   search_list.h \
485   source.h \
486   symtab.h
487 sym_ids.o: \
488   sym_ids.c \
489   $(BFDDIR)/sysdep.h \
490   $(INCDIR)/ansidecl.h \
491   $(INCDIR)/filenames.h \
492   $(INCDIR)/fopen-same.h \
493   $(INCDIR)/libiberty.h \
494   $(INCDIR)/safe-ctype.h \
495   $(INCDIR)/symcat.h \
496   ../bfd/bfd.h \
497   ../bfd/config.h \
498   cg_arcs.h \
499   corefile.h \
500   gconfig.h \
501   gprof.h \
502   search_list.h \
503   source.h \
504   sym_ids.h \
505   symtab.h
506 utils.o: \
507   utils.c \
508   $(BFDDIR)/sysdep.h \
509   $(INCDIR)/ansidecl.h \
510   $(INCDIR)/demangle.h \
511   $(INCDIR)/filenames.h \
512   $(INCDIR)/fopen-same.h \
513   $(INCDIR)/libiberty.h \
514   $(INCDIR)/symcat.h \
515   ../bfd/bfd.h \
516   ../bfd/config.h \
517   cg_arcs.h \
518   corefile.h \
519   gconfig.h \
520   gprof.h \
521   search_list.h \
522   source.h \
523   symtab.h \
524   utils.h
525 i386.o: \
526   i386.c \
527   $(BFDDIR)/sysdep.h \
528   $(INCDIR)/ansidecl.h \
529   $(INCDIR)/filenames.h \
530   $(INCDIR)/fopen-same.h \
531   $(INCDIR)/symcat.h \
532   ../bfd/bfd.h \
533   ../bfd/config.h \
534   cg_arcs.h \
535   corefile.h \
536   gconfig.h \
537   gprof.h \
538   hist.h \
539   search_list.h \
540   source.h \
541   symtab.h
542 alpha.o: \
543   alpha.c \
544   $(BFDDIR)/sysdep.h \
545   $(INCDIR)/ansidecl.h \
546   $(INCDIR)/filenames.h \
547   $(INCDIR)/fopen-same.h \
548   $(INCDIR)/symcat.h \
549   ../bfd/bfd.h \
550   ../bfd/config.h \
551   cg_arcs.h \
552   corefile.h \
553   gconfig.h \
554   gprof.h \
555   hist.h \
556   search_list.h \
557   source.h \
558   symtab.h
559 vax.o: \
560   vax.c \
561   $(BFDDIR)/sysdep.h \
562   $(INCDIR)/ansidecl.h \
563   $(INCDIR)/filenames.h \
564   $(INCDIR)/fopen-same.h \
565   $(INCDIR)/symcat.h \
566   ../bfd/bfd.h \
567   ../bfd/config.h \
568   cg_arcs.h \
569   corefile.h \
570   gconfig.h \
571   gprof.h \
572   hist.h \
573   search_list.h \
574   source.h \
575   symtab.h
576 tahoe.o: \
577   tahoe.c \
578   $(BFDDIR)/sysdep.h \
579   $(INCDIR)/ansidecl.h \
580   $(INCDIR)/filenames.h \
581   $(INCDIR)/fopen-same.h \
582   $(INCDIR)/symcat.h \
583   ../bfd/bfd.h \
584   ../bfd/config.h \
585   cg_arcs.h \
586   corefile.h \
587   gconfig.h \
588   gprof.h \
589   hist.h \
590   search_list.h \
591   source.h \
592   symtab.h
593 sparc.o: \
594   sparc.c \
595   $(BFDDIR)/sysdep.h \
596   $(INCDIR)/ansidecl.h \
597   $(INCDIR)/filenames.h \
598   $(INCDIR)/fopen-same.h \
599   $(INCDIR)/symcat.h \
600   ../bfd/bfd.h \
601   ../bfd/config.h \
602   cg_arcs.h \
603   corefile.h \
604   gconfig.h \
605   gprof.h \
606   hist.h \
607   search_list.h \
608   source.h \
609   symtab.h
610 mips.o: \
611   mips.c \
612   $(BFDDIR)/sysdep.h \
613   $(INCDIR)/ansidecl.h \
614   $(INCDIR)/filenames.h \
615   $(INCDIR)/fopen-same.h \
616   $(INCDIR)/symcat.h \
617   ../bfd/bfd.h \
618   ../bfd/config.h \
619   cg_arcs.h \
620   corefile.h \
621   gconfig.h \
622   gprof.h \
623   hist.h \
624   search_list.h \
625   source.h \
626   symtab.h
627 flat_bl.o: \
628   flat_bl.c \
629   $(INCDIR)/ansidecl.h
630 bsd_callg_bl.o: \
631   bsd_callg_bl.c \
632   $(INCDIR)/ansidecl.h
633 fsf_callg_bl.o: \
634   fsf_callg_bl.c \
635   $(INCDIR)/ansidecl.h
636 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY