Ensure /usr/include and the like stay out of dependencies.
[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 info_TEXINFOS = gprof.texi
53 man_MANS = gprof.1
54
55 # Targets to rebuild dependencies in this Makefile.
56 # Have to get rid of DEP1 here so that "$?" later includes all sources.
57 DEP: dep.sed $(gprof_SOURCES) $(noinst_HEADERS) gconfig.h
58         rm -f DEP1
59         $(MAKE) MKDEP="$(MKDEP)" DEP1
60         if grep ' /' DEP1 > /dev/null 2> /dev/null; then \
61           echo 'make DEP failed!'; exit 1; \
62         else \
63           sed -f dep.sed < DEP1 > $@; \
64           echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@; \
65         fi
66
67 DEP1: $(gprof_SOURCES)
68         echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2
69         echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP2
70         $(MKDEP) $(INCLUDES) $(CFLAGS) $? >> DEP2
71         mv -f DEP2 $@
72
73 dep.sed: dep-in.sed config.status
74         objdir=`pwd`; \
75         sed <$(srcdir)/dep-in.sed >dep.sed      \
76                 -e 's!@INCDIR@!$(INCDIR)!'      \
77                 -e 's!@BFDDIR@!$(BFDDIR)!'      \
78                 -e 's!@SRCDIR@!$(srcdir)!'      \
79                 -e "s!@OBJDIR@!$${objdir}!"
80
81 dep: DEP
82         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
83         cat DEP >> tmp-Makefile
84         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile
85
86 dep-in: DEP
87         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in
88         cat DEP >> tmp-Makefile.in
89         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in
90
91 dep-am: DEP
92         sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am
93         cat DEP >> tmp-Makefile.am
94         $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
95
96 .PHONY: dep dep-in dep-am
97
98 CLEANFILES = dep.sed DEP DEP1 DEP2
99
100 # DO NOT DELETE THIS LINE -- mkdep uses it.
101 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
102 basic_blocks.o: basic_blocks.c basic_blocks.h gprof.h \
103   $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h ../bfd/config.h \
104   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
105   $(INCDIR)/bin-bugs.h source.h search_list.h symtab.h \
106   ../bfd/bfd.h corefile.h gmon_io.h gmon.h gmon_out.h \
107   $(INCDIR)/libiberty.h sym_ids.h
108 call_graph.o: call_graph.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
109   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
110   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
111   symtab.h ../bfd/bfd.h source.h search_list.h call_graph.h \
112   corefile.h gmon_io.h gmon.h gmon_out.h sym_ids.h
113 cg_arcs.o: cg_arcs.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
114   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
115   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
116   call_graph.h symtab.h ../bfd/bfd.h source.h search_list.h \
117   cg_arcs.h cg_dfn.h cg_print.h utils.h sym_ids.h
118 cg_dfn.o: cg_dfn.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
119   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
120   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
121   cg_arcs.h symtab.h ../bfd/bfd.h source.h search_list.h \
122   cg_dfn.h utils.h
123 cg_print.o: cg_print.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
124   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
125   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
126   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
127   search_list.h cg_print.h hist.h utils.h
128 corefile.o: corefile.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
129   gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
130   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
131   corefile.h ../bfd/bfd.h symtab.h source.h search_list.h
132 gmon_io.o: gmon_io.c cg_arcs.h gprof.h $(INCDIR)/ansidecl.h \
133   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
134   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h \
135   symtab.h ../bfd/bfd.h source.h search_list.h basic_blocks.h \
136   corefile.h call_graph.h gmon_io.h gmon.h gmon_out.h \
137   hertz.h hist.h $(INCDIR)/libiberty.h
138 gprof.o: gprof.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
139   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
140   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
141   $(INCDIR)/bin-bugs.h basic_blocks.h source.h search_list.h \
142   symtab.h ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h \
143   corefile.h gmon_io.h gmon.h hertz.h hist.h sym_ids.h
144 hertz.o: hertz.c hertz.h gprof.h $(INCDIR)/ansidecl.h \
145   $(BFDDIR)/sysdep.h ../bfd/config.h $(INCDIR)/fopen-same.h \
146   $(INCDIR)/filenames.h gconfig.h $(INCDIR)/bin-bugs.h
147 hist.o: hist.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 gmon_io.h gmon.h gmon_out.h \
151   hist.h symtab.h source.h search_list.h sym_ids.h utils.h
152 source.o: source.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
153   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
154   gconfig.h $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h \
155   search_list.h source.h
156 search_list.o: search_list.c $(INCDIR)/libiberty.h \
157   $(INCDIR)/ansidecl.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
158   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
159   $(INCDIR)/bin-bugs.h search_list.h
160 symtab.o: symtab.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
161   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
162   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
163   source.h search_list.h corefile.h
164 sym_ids.o: sym_ids.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
165   cg_arcs.h gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
166   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
167   $(INCDIR)/bin-bugs.h symtab.h ../bfd/bfd.h source.h \
168   search_list.h sym_ids.h
169 utils.o: utils.c gprof.h $(BFDDIR)/sysdep.h ../bfd/config.h \
170   $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h gconfig.h \
171   $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
172   source.h search_list.h
173 i386.o: i386.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
174   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
175   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
176   source.h search_list.h corefile.h hist.h
177 alpha.o: alpha.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
178   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
179   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
180   source.h search_list.h corefile.h hist.h
181 vax.o: vax.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
182   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
183   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
184   source.h search_list.h corefile.h hist.h
185 tahoe.o: tahoe.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
186   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
187   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
188   source.h search_list.h corefile.h hist.h
189 sparc.o: sparc.c gprof.h $(INCDIR)/ansidecl.h $(BFDDIR)/sysdep.h \
190   ../bfd/config.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h \
191   gconfig.h $(INCDIR)/bin-bugs.h cg_arcs.h symtab.h ../bfd/bfd.h \
192   source.h search_list.h corefile.h hist.h
193 flat_bl.o: flat_bl.c
194 bsd_callg_bl.o: bsd_callg_bl.c
195 fsf_callg_bl.o: fsf_callg_bl.c
196 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY