media-collection-crud/Makefile

52 lines
1.2 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
run:
$(CARGO) run
clean:
$(CARGO) clean
doc:
$(CARGO) doc
test:
2019-03-29 12:33:13 -04:00
$(CARGO) test
graphs: $(GRAPH_SVG)
design/%.svg: design/%.gv
dot -Tsvg $^ -o $@