Makefile 515 B

123456789101112131415161718192021222324252627282930313233
  1. .POSIX:
  2. CARGO = cargo
  3. BIN = zkas
  4. # Dependencies which should force the binaries to be rebuilt
  5. BINDEPS = \
  6. Cargo.toml \
  7. $(shell find src -type f)
  8. all: $(BIN)
  9. $(BIN): $(BINDEPS)
  10. $(CARGO) build --release --all-features --bin $@
  11. cp target/release/$@ $@
  12. test:
  13. $(CARGO) test --release --all-features
  14. fix:
  15. $(CARGO) fix --release --all-features --allow-dirty
  16. clippy:
  17. $(CARGO) clippy --release --all-features
  18. clean:
  19. rm -f $(BIN)
  20. distclean: clean
  21. rm -rf target
  22. .PHONY: all test fix clippy clean distclean