-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 909 Bytes
/
Makefile
File metadata and controls
44 lines (35 loc) · 909 Bytes
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
# Makefile for rlinks
# Builds the workspace and collects release binaries into dist/
SHELL := /bin/bash
BINARIES := rlinks-cli rlinks-worker rlinks-bh2 bench-harness
.PHONY: all build dist test fmt clippy clean
all: build dist
# Build release artifacts for the entire workspace
build:
cargo build --workspace --release
# Collect release binaries into ./dist
dist: build
@mkdir -p dist
@echo "Copying binaries to dist/"
@for bin in $(BINARIES); do \
src=target/release/$$bin; \
if [ -f $$src ]; then \
cp $$src dist/; \
echo " - $$bin"; \
else \
echo " - skipped $$bin (not built)"; \
fi; \
done
@ls -la dist || true
# Run the test suite for the workspace
test:
cargo test --workspace
# Formatting and lint helpers
fmt:
cargo fmt --all
clippy:
cargo clippy --workspace --all-targets -- -D warnings
# Clean build artifacts and dist folder
clean:
cargo clean
@rm -rf dist