# The default make command DEFAULT = help # Use 'VERBOSE=1' to echo all commands, for example 'make help VERBOSE=1'. ifdef VERBOSE Q := else Q := @ endif GRAPH_SRC=$(wildcard design/*.gv) GRAPH_SVG=$(patsubst %.gv,%.svg,$(GRAPH_SRC)) GRAPH_IMG=$(patsubst %.gv,%.png,$(GRAPH_SRC)) all: $(DEFAULT) help: $(Q)echo "make run - Runs executable" $(Q)echo "make build - Builds main executable" $(Q)echo "make lib - Builds library" $(Q)echo "make test - Runs all tests" $(Q)echo "make bench - Benchmarks library internally and externally" $(Q)echo "make bench-internal - Benchmarks library internally" $(Q)echo "make bench-external - Benchmarks library externally" $(Q)echo "make doc - Builds documentation for library" $(Q)echo "make git-ignore - Setup files to be ignored by Git" $(Q)echo "make examples - Builds examples" $(Q)echo "make clean - Deletes binaries and documentation. .PHONY: build run test bench doc examples graphs clean build: cargo build run: cargo run clean: cargo clean doc: cargo doc test: cargo test graphs-png: $(GRAPH_IMG) design/%.png: design/%.gv dot -Tpng $^ -o $@ graphs: $(GRAPH_SVG) graphs-png design/%.svg: design/%.gv dot -Tsvg $^ -o $@