Commit | Line | Data |
---|---|---|
89a471fe SEF |
1 | # @(#)Makefile 5.17 (Berkeley) 5/11/90 |
2 | ||
9cda8e3a BC |
3 | .SUFFIXES : .m |
4 | ||
7858d8dc C |
5 | VPATH = @srcdir@ |
6 | srcdir = @srcdir@ | |
7 | prefix = @prefix@ | |
8 | ||
9388476b | 9 | exec_prefix = $(prefix) |
7858d8dc C |
10 | program_transform_name = @program_transform_name@ |
11 | ||
9388476b JG |
12 | bindir = $(exec_prefix)/bin |
13 | libdir = $(exec_prefix)/lib | |
f4a0f42d | 14 | tooldir = $(libdir) |
9388476b JG |
15 | mandir = $(prefix)/man |
16 | man1dir = $(mandir)/man1 | |
f4a0f42d | 17 | |
2518bf37 | 18 | infodir = $(prefix)/info |
f4a0f42d ME |
19 | datadir = $(prefix)/lib |
20 | ||
3ecd5c7d C |
21 | SHELL = /bin/sh |
22 | ||
b4a1e77b | 23 | INSTALL = `cd $(srcdir); pwd`/../install.sh -c |
f4a0f42d | 24 | INSTALL_PROGRAM = $(INSTALL) |
b4a1e77b SC |
25 | INSTALL_DATA = $(INSTALL) |
26 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' | |
27 | INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1 | |
2518bf37 JO |
28 | MAKEINFO = makeinfo |
29 | TEX = tex | |
30 | TEXINDEX = texindex | |
31 | ||
32 | # this is the directory we look in to find Texinfo | |
33 | texidir = $(srcdir)/../texinfo | |
f4a0f42d | 34 | |
4c92f064 | 35 | MY_TARGET= @MY_TARGET@ |
c98f0ae5 | 36 | |
c98f0ae5 | 37 | PROG= gprof |
4c92f064 | 38 | SRCS= $(MY_TARGET).c basic_blocks.c call_graph.c \ |
5489fcc3 KR |
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 \ | |
41 | sym_ids.c utils.c | |
42 | ||
c98f0ae5 SEF |
43 | LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a |
44 | ||
4c92f064 | 45 | OBJS= $(MY_TARGET).o basic_blocks.o bsd_callg_bl.o call_graph.o \ |
5489fcc3 KR |
46 | cg_arcs.o cg_dfn.o cg_print.o core.o flat_bl.o fsf_callg_bl.o \ |
47 | gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o \ | |
48 | sym_ids.o utils.o | |
3d3e494e PB |
49 | |
50 | # Files that can be generated, but should be included in distribution. | |
51 | DISTSTUFF = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c | |
c98f0ae5 | 52 | |
5489fcc3 | 53 | CFLAGS=-g -DDEBUG |
9d651373 | 54 | LDFLAGS= |
9138a2e2 | 55 | .c.o: |
4c92f064 | 56 | $(CC) -c $(CFLAGS) -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $< |
89a471fe | 57 | |
3d3e494e | 58 | all: diststuff $(PROG) |
c98f0ae5 | 59 | |
80c8fd72 | 60 | .PHONY: check installcheck info install-info |
3d3e494e PB |
61 | .SUFFIXES: .m |
62 | ||
63 | .m.c: | |
64 | awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ | |
65 | FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \ | |
66 | FILE=$*.m $(srcdir)/$*.m | |
67 | ||
fc9e7850 | 68 | diststuff: $(DISTSTUFF) info |
2518bf37 JO |
69 | |
70 | gprof.info: gprof.texi | |
71 | $(MAKEINFO) -o gprof.info $(srcdir)/gprof.texi | |
72 | ||
73 | gprof.dvi: gprof.texi | |
74 | TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi | |
75 | $(TEXINDEX) gprof.?? | |
76 | TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi | |
77 | ||
78 | info: gprof.info | |
79 | ||
80 | dvi: gprof.dvi | |
3d3e494e | 81 | |
a215e6f9 | 82 | check: |
80c8fd72 | 83 | installcheck: |
a215e6f9 | 84 | |
8afeb6ee KR |
85 | install-info: gprof.info |
86 | if [ -r gprof.info ]; then \ | |
87 | dir=. ; \ | |
88 | else \ | |
89 | dir=$(srcdir) ; \ | |
90 | fi ; \ | |
91 | for i in `cd $$dir; echo gprof.info*` ; do \ | |
92 | $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \ | |
2518bf37 JO |
93 | done |
94 | ||
e4fc2696 | 95 | install: all |
b4a1e77b SC |
96 | $(INSTALL_XFORM) gprof $(bindir)/gprof |
97 | $(INSTALL_XFORM1) $(srcdir)/gprof.1 $(man1dir)/gprof.1 | |
c98f0ae5 | 98 | |
15aca511 | 99 | gprof: $(OBJS) $(LIBS) |
9d651373 | 100 | $(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS) |
89a471fe | 101 | |
3d3e494e | 102 | mostlyclean: |
fc9e7850 | 103 | -rm -f *.o core gprof nohup.out \ |
2518bf37 JO |
104 | gprof.cps gprof.fns gprof.log gprof.ps gprof.tps\ |
105 | gprof.aux gprof.dvi gprof.ky gprof.pg gprof.toc gprof.vr\ | |
106 | gprof.cp gprof.fn gprof.kys gprof.pgs gprof.tp gprof.vrs | |
3d3e494e PB |
107 | clean: mostlyclean |
108 | -rm -f gprof | |
109 | distclean: clean | |
9e4be2c7 | 110 | -rm -f config.cache config.log config.status Makefile |
0312401c | 111 | maintainer-clean realclean: distclean |
fc9e7850 | 112 | -rm -f $(DISTSTUFF) *.info* |
9388476b | 113 | |
3ecd5c7d C |
114 | Makefile: Makefile.in config.status |
115 | $(SHELL) config.status | |
9388476b | 116 | |
3ecd5c7d C |
117 | config.status: configure |
118 | $(SHELL) config.status --recheck | |
9388476b | 119 | |
869b94c5 KR |
120 | $(OBJS): ../bfd/bfd.h call_graph.h cg_arcs.h cg_print.h core.h gmon_io.h \ |
121 | gmon_out.h gprof.h hertz.h hist.h search_list.h source.h sym_ids.h \ | |
122 | symtab.h utils.h $(srcdir)/../include/libiberty.h \ | |
123 | $(srcdir)/../bfd/sysdep.h $(MY_TARGET).h | |
124 | ||
1221d638 | 125 | # These get around a bug in Sun Make in SunOS 4.1.1 and Solaris 2 |
4c92f064 | 126 | $(MY_TARGET).o: $(MY_TARGET).c |
5489fcc3 KR |
127 | basic_blocks.o: basic_blocks.c |
128 | bsd_call_bl.o: bsd_call_bl.c | |
129 | call_graph.o: call_graph.c | |
130 | cg_arcs.o: cg_arcs.c | |
131 | cg_dfn.o: cg_dfn.c | |
132 | cg_print.o: cg_print.c | |
133 | core.o: core.c | |
3d3e494e | 134 | flat_bl.o: flat_bl.c |
3d3e494e | 135 | fsf_callg_bl.o: fsf_callg_bl.c |
5489fcc3 KR |
136 | gmon_io.o: gmon_io.c |
137 | gprof.o: gprof.c | |
138 | hertz.o: hertz.c | |
139 | hist.o: hist.c | |
140 | search_list.o: search_list.c | |
141 | source.o: source.c | |
142 | symtab.o: symtab.c | |
143 | sym_ids.o: sym_ids.c | |
144 | utils.o: utils.c |