Makefile 680 B

12345678910111213141516171819202122232425262728293031323334353637
  1. .POSIX:
  2. # Cargo binary
  3. CARGO = cargo
  4. # Binary to be built
  5. BIN = ircd
  6. # Dependencies which should force the binaries to be rebuilt
  7. BINDEPS = \
  8. Cargo.toml \
  9. $(shell find src -type f) \
  10. $(shell find ../../sql -type f) \
  11. $(shell find ../../contrib/token -type f)
  12. all: $(BIN)
  13. $(BIN): $(BINDEPS)
  14. $(CARGO) build --release --all-features
  15. cp -f target/release/$@ $@
  16. check: $(BINDEPS)
  17. $(CARGO) hack check --release --feature-powerset --no-dev-deps
  18. fix:
  19. $(CARGO) clippy --release --all-features --fix --allow-dirty
  20. clippy:
  21. $(CARGO) clippy --release --all-features
  22. test:
  23. $(CARGO) test --release --all-features
  24. clean:
  25. rm -f $(BIN)
  26. .PHONY: all check fix clippy test clean