[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
cflow
in Makefiles. If you wish to use cflow
to analyze your project
sources, ‘Makefile’ or ‘Makefile.am’ is the right place to
do so. In this chapter we will describe a generic rule for
‘Makefile.am’. If you do not use automake
, you can
deduce the rule for plain ‘Makefile’ from this one.
Here is a check list of steps to do to set up a ‘Makefile.am’ framework:
EXTRA_DIST
variable.
CFLOW_FLAGS
with any special cflow
options you wish to use. The variable can be empty, its main purpose
is making it possible to override cflow
options by running
make CFLOW_FLAGS=… chart
.
dir_PROGRAMS
list,
for which you want to generate a flow chart, add the following statements:
program_CFLOW_INPUT=$(program_OBJECTS:.$(OBJEXT)=.c) program.cflow: program_CFLOW_INPUT cflow.rc Makefile CFLOWRC=path-to-your-cflow.rc \ cflow -oprogram.cflow $(CFLOW_FLAGS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) \ $(program_CFLOW_INPUT)
Replace program with program name and
path-to-your-cflow.rc with the full file name of your
‘cflow.rc’ file (if any). If you do not wish to use
preprocessing, remove from the cflow
command line all
variables, except CFLOW_FLAGS
.
flowcharts: prog1.cflow prog2.cflow ...
As an example, here are the relevant statements which we use in
cflow
‘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)
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on December 30, 2021 using texi2html 5.0.