0

I want to generate call graph from a object with makefile. I have read the offical manual, at this page, it decribe a way to use cflow in makefile, but not specific enough. I tried to follow the manual, but I didn't get any output.

What have I done(to test, I use "cflow-1.6" source code):

  1. Add below code to "Makefile.am" in the object root path ".../cflow-1.6/":
EXTRA_DIST=cflow.rc

CFLOW_FLAGS=-i^s
cflow_CFLOW_INPUT=$(cflow_OBJECTS:.$(OBJEXT)=.c)
cflow.cflow: $(cflow_CFLOW_INPUT) cflow.rc Makefile
    CFLOWRC=$(top_srcdir)/src/cflow.rc \
     cflow -ocflow.cflow $(CFLOW_FLAGS) $(DEFS) \
                    $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
                $(CPPFLAGS) \
         $(cflow_CFLOW_INPUT)
  1. execute "./configure" in the object root path ".../cflow-1.6/".
  2. execute "make" in the object root path ".../cflow-1.6/".
0811张庆昊
  • 538
  • 4
  • 16

1 Answers1

0

With the help of Some programmer dud, I got the result. Flow this step:

  1. execute "./configure" in the object root path ".../cflow-1.6/".
  2. Add below code to ".../cflow-1.6/src/Makefile.am":
EXTRA_DIST=cflow.rc

CFLOW_FLAGS=-i^s
cflow_CFLOW_INPUT=$(cflow_OBJECTS:.$(OBJEXT)=.c)
cflow.cflow: $(cflow_CFLOW_INPUT) cflow.rc Makefile
    CFLOWRC=$(top_srcdir)/src/cflow.rc \
     cflow -ocflow.cflow $(CFLOW_FLAGS) $(DEFS) \
                    $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
                $(CPPFLAGS) \
         $(cflow_CFLOW_INPUT)
  1. execute "make cflow.cflow" in the object path ".../cflow-1.6/src".

Then I got the output file ".../cflow-1.6/src/cflow.cflow".

0811张庆昊
  • 538
  • 4
  • 16