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 ME |
14 | |
15 | datadir = $(prefix)/lib | |
16 | ||
9388476b | 17 | INSTALL = install -c |
f4a0f42d | 18 | INSTALL_PROGRAM = $(INSTALL) |
9388476b | 19 | INSTALL_DATA = $(INSTALL) |
f4a0f42d | 20 | |
89a471fe SEF |
21 | #### host and target dependent Makefile fragments come in here. |
22 | ### | |
c98f0ae5 | 23 | |
c98f0ae5 | 24 | PROG= gprof |
4be49df5 | 25 | SRCS= gprof.c arcs.c dfn.c lookup.c $(MACHINE).c hertz.c \ |
c98f0ae5 SEF |
26 | printgprof.c printlist.c |
27 | LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a | |
28 | ||
3d3e494e PB |
29 | OBJS= gprof.o arcs.o dfn.o lookup.o $(MACHINE).o hertz.o \ |
30 | printgprof.o printlist.o \ | |
31 | flat_bl.o bsd_callg_bl.o fsf_callg_bl.o | |
32 | ||
33 | # Files that can be generated, but should be included in distribution. | |
34 | DISTSTUFF = flat_bl.c bsd_callg_bl.c fsf_callg_bl.c | |
c98f0ae5 | 35 | |
1221d638 | 36 | CFLAGS= |
9138a2e2 | 37 | .c.o: |
ea2b679c | 38 | $(CC) -c $(CFLAGS) -I$(srcdir) -I$(srcdir)/../include -DMACHINE_H=\"$(MACHINE).h\" $(TCFLAGS) $(HCFLAGS) $< |
89a471fe | 39 | |
3d3e494e | 40 | all: diststuff $(PROG) |
c98f0ae5 | 41 | |
9388476b | 42 | .PHONY: check info install-info |
3d3e494e PB |
43 | .SUFFIXES: .m |
44 | ||
45 | .m.c: | |
46 | awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \ | |
47 | FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \ | |
48 | FILE=$*.m $(srcdir)/$*.m | |
49 | ||
50 | diststuff: $(DISTSTUFF) | |
51 | ||
52 | ||
a215e6f9 | 53 | check: |
9388476b JG |
54 | info: |
55 | install-info: | |
a215e6f9 | 56 | |
f4a0f42d | 57 | install: all |
3c9c3ce3 ILT |
58 | -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ |
59 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
60 | -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi | |
61 | -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \ | |
62 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi | |
63 | -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi | |
c3193400 | 64 | $(INSTALL_PROGRAM) $(PROG) $(bindir) |
ea2b679c | 65 | $(INSTALL_DATA) $(srcdir)/gprof.1 $(man1dir)/gprof.1 |
c98f0ae5 | 66 | |
c98f0ae5 SEF |
67 | $(PROG): $(OBJS) |
68 | $(CC) $(CFLAGS) $(OBJS) -o $(PROG) $(LIBS) | |
89a471fe | 69 | |
3d3e494e PB |
70 | mostlyclean: |
71 | -rm -f *.o core gprof nohup.out | |
72 | clean: mostlyclean | |
73 | -rm -f gprof | |
74 | distclean: clean | |
75 | -rm -f config.status Makefile | |
76 | realclean: distclean | |
77 | -rm -f $(DISTSTUFF) | |
9388476b JG |
78 | |
79 | Makefile : Makefile.in | |
80 | sh config.status | |
81 | ||
82 | ||
1221d638 ME |
83 | # These get around a bug in Sun Make in SunOS 4.1.1 and Solaris 2 |
84 | gprof.o: gprof.c | |
85 | arcs.o: arcs.c | |
86 | dfn.o: dfn.c | |
87 | lookup.o: lookup.c | |
ea2b679c | 88 | $(MACHINE).o: $(MACHINE).c |
1221d638 ME |
89 | hertz.o: hertz.c |
90 | printgprof.o: printgprof.c | |
91 | printlist.o: printlist.c | |
3d3e494e PB |
92 | flat_bl.o: flat_bl.c |
93 | bsd_callg_bl.o: bsd_callg_bl.c | |
94 | fsf_callg_bl.o: fsf_callg_bl.c |