diff options
Diffstat (limited to 'examples/visual')
| -rw-r--r-- | examples/visual/Makefile | 28 | ||||
| -rw-r--r-- | examples/visual/README.md | 35 | ||||
| -rw-r--r-- | examples/visual/out.png | bin | 0 -> 26851 bytes |
3 files changed, 63 insertions, 0 deletions
diff --git a/examples/visual/Makefile b/examples/visual/Makefile new file mode 100644 index 0000000..6352ecb --- /dev/null +++ b/examples/visual/Makefile @@ -0,0 +1,28 @@ +# Simple Makefile Example + +# Default target +all: build test clean + +# Build target +build: compile link + @echo "Building the project..." + +# Compile target +compile: init + @echo "Compiling source files..." + +# Link target +link: init + @echo "Linking objects..." + +# Test target +test: build + @echo "Running tests..." + +# Clean target +clean: + @echo "Cleaning up..." + +# Init target (independent target) +init: + @echo "Initializing the build environment..." diff --git a/examples/visual/README.md b/examples/visual/README.md new file mode 100644 index 0000000..f497901 --- /dev/null +++ b/examples/visual/README.md @@ -0,0 +1,35 @@ +# README + +Creates a graph of dependencies from GNU-Make using [make2graph](https://github.com/lindenb/makefile2graph). + +```console +git clone https://github.com/lindenb/makefile2graph.git +cd makefile2graph +make +./make2graph --version +``` +``` +1.5.0 +``` + +Install `graphviz`. + +```console +sudo apt update +sudo apt install -y graphviz +``` + +`make` + +* -B, --always-make + * Unconditionally make all targets. +* -n, --just-print, --dry-run, --recon + * Print the commands that would be executed, but do not execute them (except in certain circumstances). +* -d + * Print debugging information in addition to normal processing. + +```console +make -Bnd | ./make2graph | dot -Tpng -o out.png +``` + + diff --git a/examples/visual/out.png b/examples/visual/out.png Binary files differnew file mode 100644 index 0000000..becc47e --- /dev/null +++ b/examples/visual/out.png |
