1 # @(#)Makefile 5.17 (Berkeley) 5/11/90
9 exec_prefix = @exec_prefix@
10 program_transform_name = @program_transform_name@
16 man1dir = $(mandir)/man1
23 INSTALL = `cd $(srcdir); pwd`/../install.sh -c
24 INSTALL_PROGRAM = @INSTALL_PROGRAM@
25 INSTALL_DATA = @INSTALL_DATA@
26 INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
27 INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
32 # this is the directory we look in to find Texinfo
33 texidir = $(srcdir)/../texinfo
35 MY_TARGET= @MY_TARGET@
38 SRCS= $(MY_TARGET).c basic_blocks.c call_graph.c \
39 cg_arcs.c cg_dfn.c cg_print.c core.c \
40 gmon_io.c gprof.c hertz.c hist.c source.c search_list.c symtab.c \
43 LIBDEPS = ../bfd/libbfd.a ../libiberty/libiberty.a
44 LIBS = @BFDLIB@ ../libiberty/libiberty.a
46 OBJS= $(MY_TARGET).o basic_blocks.o bsd_callg_bl.o call_graph.o \
47 cg_arcs.o cg_dfn.o cg_print.o core.o flat_bl.o fsf_callg_bl.o \
48 gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o \
51 # Files that can be generated, but should be included in distribution.
52 GEN_FILES = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c
58 $(CC) -c $(CFLAGS) -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $<
60 all: $(GEN_FILES) $(PROG)
62 .PHONY: check installcheck info install-info
66 awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
67 FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
68 FILE=$*.m $(srcdir)/$*.m
70 diststuff: $(GEN_FILES) info
72 gprof.info: gprof.texi
73 $(MAKEINFO) -o gprof.info $(srcdir)/gprof.texi
76 TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
78 TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi
88 etags $(srcdir)/*.[ch]
91 install-info: gprof.info
92 if [ -r gprof.info ]; then \
97 for i in `cd $$dir; echo gprof.info*` ; do \
98 $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
102 $(INSTALL_XFORM) gprof $(bindir)/gprof
103 $(INSTALL_XFORM1) $(srcdir)/gprof.1 $(man1dir)/gprof.1
105 gprof: $(OBJS) $(LIBDEPS)
106 $(CC) -o $(PROG) $(HLDFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
109 -rm -f *.o core gprof nohup.out \
110 gprof.cps gprof.fns gprof.log gprof.ps gprof.tps\
111 gprof.aux gprof.dvi gprof.ky gprof.pg gprof.toc gprof.vr\
112 gprof.cp gprof.fn gprof.kys gprof.pgs gprof.tp gprof.vrs
116 -rm -f config.cache config.log config.status Makefile
117 maintainer-clean realclean: distclean
118 -rm -f $(GEN_FILES) *.info*
120 Makefile: Makefile.in config.status
121 $(SHELL) config.status
123 config.status: configure
124 $(SHELL) config.status --recheck
126 $(OBJS): ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h core.h gmon_io.h \
127 gmon_out.h gprof.h hertz.h hist.h search_list.h source.h sym_ids.h \
128 symtab.h utils.h $(srcdir)/../include/libiberty.h \
129 $(srcdir)/../bfd/sysdep.h $(MY_TARGET).h
131 # These get around a bug in Sun Make in SunOS 4.1.1 and Solaris 2
132 $(MY_TARGET).o: $(MY_TARGET).c
133 basic_blocks.o: basic_blocks.c
134 bsd_call_bl.o: bsd_call_bl.c
135 call_graph.o: call_graph.c
138 cg_print.o: cg_print.c
141 fsf_callg_bl.o: fsf_callg_bl.c
146 search_list.o: search_list.c