diff --git a/etc/Makefile b/etc/Makefile index 4bee0f0..adc04df 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -59,7 +59,7 @@ appcallgraph: $(APPCALLGRAPH) ./graphdeps.py $< --out $@ --showops ../%/callgraph.pdf: ../%/callgraph.d - (cd $(dir $@); ../../etc/graphdeps.py $(notdir $<) --out $(notdir $@)) + (cd $(dir $@); ../../etc/graphdeps.py --calls $(notdir $<) --out $(notdir $@)) ../%/files.d: ../%/Makefile (cd $(dir $@); ../../etc/makemake.py --relpath --files . . ../../drivers ../../drivers/avr ../../utils --exclude system.h > files.d) diff --git a/etc/graphdeps.py b/etc/graphdeps.py index 475efe7..2df457d 100755 --- a/etc/graphdeps.py +++ b/etc/graphdeps.py @@ -61,6 +61,10 @@ def node_output (dotfile, name, options): colour = 'orange' shape = 'rectangle' + if options.calls: + colour = 'magenta' + shape = 'rectangle' + dotfile.write ('\t"' + name + '"\t [style=filled,shape=' + shape + ',color=' + colour + '];\n') return name @@ -145,6 +149,10 @@ def main(argv = None): dest = 'modules', default = False, help = 'show module dependencies') + parser.add_option('--calls', action = 'store_true', + dest = 'calls', default = False, + help = 'show callgraph') + parser.add_option('--fullpaths', action = 'store_true', dest = 'fullpaths', default = False, help = 'show full paths')