media-collection-crud/Makefile

57 lines
1.3 KiB
Makefile
Raw Normal View History

2019-03-29 10:35:58 -04:00
# 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
2019-03-29 12:33:13 -04:00
GRAPH_SRC=$(wildcard design/*.gv)
GRAPH_SVG=$(patsubst %.gv,%.svg,$(GRAPH_SRC))
GRAPH_IMG=$(patsubst %.gv,%.png,$(GRAPH_SRC))
2019-03-29 10:35:58 -04:00
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.
2019-03-29 12:33:13 -04:00
.PHONY: build run test bench doc examples graphs clean
2019-03-29 10:35:58 -04:00
build:
cargo build
2019-03-29 10:35:58 -04:00
run:
cargo run
2019-03-29 10:35:58 -04:00
clean:
cargo clean
2019-03-29 10:35:58 -04:00
doc:
cargo doc
2019-03-29 10:35:58 -04:00
test:
cargo test
2019-03-29 12:33:13 -04:00
2019-03-29 12:40:31 -04:00
graphs-png: $(GRAPH_IMG)
design/%.png: design/%.gv
dot -Tpng $^ -o $@
graphs: $(GRAPH_SVG) graphs-png
2019-03-29 12:33:13 -04:00
design/%.svg: design/%.gv
dot -Tsvg $^ -o $@
2019-03-29 12:40:31 -04:00