]>
Commit | Line | Data |
---|---|---|
89a471fe SEF |
1 | # @(#)Makefile 5.17 (Berkeley) 5/11/90 |
2 | ||
9388476b | 3 | srcdir = . |
1221d638 | 4 | |
9388476b | 5 | prefix = /usr/local |
f4a0f42d | 6 | |
9388476b JG |
7 | program_prefix = |
8 | exec_prefix = $(prefix) | |
9 | bindir = $(exec_prefix)/bin | |
10 | libdir = $(exec_prefix)/lib | |
f4a0f42d | 11 | tooldir = $(libdir) |
9388476b JG |
12 | mandir = $(prefix)/man |
13 | man1dir = $(mandir)/man1 | |
f4a0f42d | 14 | |
2518bf37 | 15 | infodir = $(prefix)/info |
f4a0f42d ME |
16 | datadir = $(prefix)/lib |
17 | ||
9388476b | 18 | INSTALL = install -c |
f4a0f42d | 19 | INSTALL_PROGRAM = $(INSTALL) |
9388476b | 20 | INSTALL_DATA = $(INSTALL) |
2518bf37 JO |
21 | MAKEINFO = makeinfo |
22 | TEX = tex | |
23 | TEXINDEX = texindex | |
24 | ||
25 | # this is the directory we look in to find Texinfo | |
26 | texidir = $(srcdir)/../texinfo | |
f4a0f42d | 27 | |
89a471fe SEF |
28 | #### host and target dependent Makefile fragments come in here. |
29 | ### | |
c98f0ae5 | 30 | |
c98f0ae5 | 31 | PROG= gprof |
4be49df5 | 32 | SRCS= gprof.c arcs.c dfn.c lookup.c $(MACHINE).c hertz.c \ |
c98f0ae5 SEF |
33 | printgprof.c printlist.c |
34 | LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a | |
35 | ||
3d3e494e PB |
36 | OBJS= gprof.o arcs.o dfn.o lookup.o $(MACHINE).o hertz.o \ |
37 | printgprof.o printlist.o \ | |
38 | flat_bl.o bsd_callg_bl.o fsf_callg_bl.o | |
39 | ||
40 | # Files that can be generated, but should be included in distribution. | |
41 | DISTSTUFF = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c | |
c98f0ae5 | 42 | |
1221d638 | 43 | CFLAGS= |
9138a2e2 | 44 | .c.o: |
ea2b679c | 45 | $(CC) -c $(CFLAGS) -I$(srcdir) -I$(srcdir)/../include -DMACHINE_H=\"$(MACHINE).h\" $(TCFLAGS) $(HCFLAGS) $< |
89a471fe | 46 | |
3d3e494e | 47 | all: diststuff $(PROG) |
c98f0ae5 | 48 | |
9388476b | 49 | .PHONY: check info install-info |
3d3e494e PB |
50 | .SUFFIXES: .m |
51 | ||
52 | .m.c: | |
53 | awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ | |
54 | FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \ | |
55 | FILE=$*.m $(srcdir)/$*.m | |
56 | ||
57 | diststuff: $(DISTSTUFF) | |
2518bf37 JO |
58 | |
59 | gprof.info: gprof.texi | |
60 | $(MAKEINFO) -o gprof.info $(srcdir)/gprof.texi | |
61 | ||
62 | gprof.dvi: gprof.texi | |
63 | TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi | |
64 | $(TEXINDEX) gprof.?? | |
65 | TEXINPUTS=${TEXIDIR}:$(srcdir):$$TEXINPUTS $(TEX) $(srcdir)/gprof.texi | |
66 | ||
67 | info: gprof.info | |
68 | ||
69 | dvi: gprof.dvi | |
3d3e494e | 70 | |
a215e6f9 RP |
71 | check: |
72 | ||
2518bf37 JO |
73 | install-info: info |
74 | -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \ | |
75 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
76 | -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi | |
77 | for i in *.info* ; do \ | |
78 | $(INSTALL_DATA) $$i $(infodir)/$$i ; \ | |
79 | done | |
80 | ||
81 | install: all install-info | |
3c9c3ce3 ILT |
82 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ |
83 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
84 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
85 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ | |
86 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
87 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi | |
dedfbe49 | 88 | $(INSTALL_PROGRAM) $(PROG) $(bindir)/$(PROG) |
ea2b679c | 89 | $(INSTALL_DATA) $(srcdir)/gprof.1 $(man1dir)/gprof.1 |
c98f0ae5 | 90 | |
c98f0ae5 SEF |
91 | $(PROG): $(OBJS) |
92 | $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(LIBS) | |
89a471fe | 93 | |
3d3e494e | 94 | mostlyclean: |
2518bf37 JO |
95 | -rm -f *.o core gprof nohup.out gprof.info* \ |
96 | gprof.cps gprof.fns gprof.log gprof.ps gprof.tps\ | |
97 | gprof.aux gprof.dvi gprof.ky gprof.pg gprof.toc gprof.vr\ | |
98 | gprof.cp gprof.fn gprof.kys gprof.pgs gprof.tp gprof.vrs | |
3d3e494e PB |
99 | clean: mostlyclean |
100 | -rm -f gprof | |
101 | distclean: clean | |
102 | -rm -f config.status Makefile | |
103 | realclean: distclean | |
104 | -rm -f $(DISTSTUFF) | |
9388476b JG |
105 | |
106 | Makefile : Makefile.in | |
107 | sh config.status | |
108 | ||
109 | ||
1221d638 ME |
110 | # These get around a bug in Sun Make in SunOS 4.1.1 and Solaris 2 |
111 | gprof.o: gprof.c | |
112 | arcs.o: arcs.c | |
113 | dfn.o: dfn.c | |
114 | lookup.o: lookup.c | |
ea2b679c | 115 | $(MACHINE).o: $(MACHINE).c |
1221d638 ME |
116 | hertz.o: hertz.c |
117 | printgprof.o: printgprof.c | |
118 | printlist.o: printlist.c | |
3d3e494e PB |
119 | flat_bl.o: flat_bl.c |
120 | bsd_callg_bl.o: bsd_callg_bl.c | |
121 | fsf_callg_bl.o: fsf_callg_bl.c |