srcdir = @srcdir@
prefix = @prefix@
-exec_prefix = $(prefix)
+exec_prefix = @exec_prefix@
program_transform_name = @program_transform_name@
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
+bindir = @bindir@
+libdir = @libdir@
tooldir = $(libdir)
-mandir = $(prefix)/man
+mandir = @mandir@
man1dir = $(mandir)/man1
-infodir = $(prefix)/info
-datadir = $(prefix)/lib
+infodir = @infodir@
+datadir = @datadir@
SHELL = /bin/sh
INSTALL = `cd $(srcdir); pwd`/../install.sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
MAKEINFO = makeinfo
gmon_io.c gprof.c hertz.c hist.c source.c search_list.c symtab.c \
sym_ids.c utils.c
-LIBS = ../bfd/libbfd.a ../libiberty/libiberty.a
+LIBDEPS = ../bfd/libbfd.a ../libiberty/libiberty.a
+LIBS = @BFDLIB@ ../libiberty/libiberty.a
OBJS= $(MY_TARGET).o basic_blocks.o bsd_callg_bl.o call_graph.o \
cg_arcs.o cg_dfn.o cg_print.o core.o flat_bl.o fsf_callg_bl.o \
CFLAGS=-g -DDEBUG
LDFLAGS=
+HLDFLAGS = @HLDFLAGS@
+HLDENV = @HLDENV@
.c.o:
- $(CC) -c $(CFLAGS) -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $<
+ $(CC) -c -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/../include -I$(srcdir)/../bfd @DEFS@ -DTARGET_$(MY_TARGET) -DMACHINE_H=\"$(MY_TARGET).h\" $(TCFLAGS) $(HCFLAGS) $(CFLAGS) $<
all: $(GEN_FILES) $(PROG)
.m.c:
awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
- FUNCTION=`(echo $*|sed -e 's/_bl//')`_blurb \
+ FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
FILE=$*.m $(srcdir)/$*.m
diststuff: $(GEN_FILES) info
$(INSTALL_XFORM) gprof $(bindir)/gprof
$(INSTALL_XFORM1) $(srcdir)/gprof.1 $(man1dir)/gprof.1
-gprof: $(OBJS) $(LIBS)
- $(CC) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)
+gprof: $(OBJS) $(LIBDEPS)
+ $(HLDENV) $(CC) -o $(PROG) $(HLDFLAGS) $(LDFLAGS) $(CFLAGS) $(OBJS) $(LIBS)
mostlyclean:
-rm -f *.o core gprof nohup.out \