-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (41 loc) · 1.21 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: all build test clean release check fmt lint audit docker-build help
CARGO := cargo
DOCKER := docker
TARGET_DIR := target
RELEASE_DIR := $(TARGET_DIR)/release
DEBUG_DIR := $(TARGET_DIR)/debug
# # Default target platform, can be overridden via command line
# TARGET ?= x86_64-unknown-linux-musl
# Binary names from Cargo.toml
PRODUCER_BIN := mqdish
CONSUMER_BIN := mqdish-consumer
help:
@echo "Available targets:"
@echo " build - Build all binaries in debug mode"
@echo " test - Run all tests"
@echo " clean - Remove build artifacts"
@echo " check - Run cargo check"
@echo " fmt - Format code using rustfmt"
@echo " lint - Run clippy linter"
@echo " audit - Run security audit"
@echo ""
@echo "Environment variables:"
@echo " DOCKER - Docker command, could be 'docker' or 'podman'"
@echo " IMAGE_TAG - Docker image tag (default: git tag or commit hash)"
all: fmt lint check audit test build
build:
$(CARGO) build --all
test:
$(CARGO) test
clean:
$(CARGO) clean
rm -f *.tar.gz
rm -f checksums.*.txt
check:
$(CARGO) check
fmt:
$(CARGO) fmt
lint:
$(CARGO) clippy --all-targets --all-features -- -D warnings
audit:
cargo audit