-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (48 loc) · 2.65 KB
/
Makefile
File metadata and controls
75 lines (48 loc) · 2.65 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.PHONY: build build-all release install test test-ci clippy fmt check run debug repin clean \
release-macos-arm release-macos-x86 release-linux-arm release-linux-x86 release-windows
# ── Build ────────────────────────────────────────────────────────────────────
build:
bazel build //:loopal
build-all:
bazel build //...
INSTALL_DIR ?= $(HOME)/.local/bin
release:
bazel build //:loopal -c opt
install: release
@mkdir -p $(INSTALL_DIR)
cp -f bazel-bin/loopal $(INSTALL_DIR)/loopal
@echo "Installed to $(INSTALL_DIR)/loopal"
# ── Test ─────────────────────────────────────────────────────────────────────
test:
bazel test //...
test-ci:
bazel test //... --config=ci
# ── Code Quality ─────────────────────────────────────────────────────────────
clippy:
bazel build //... --config=clippy
fmt:
bazel build //... --config=rustfmt
check: clippy fmt test
# ── Run ──────────────────────────────────────────────────────────────────────
MODEL ?= claude-opus-4-6
run: build
./bazel-bin/loopal -m $(MODEL) $(ARGS)
debug: build
LOOPAL_LOG=debug ./bazel-bin/loopal -m $(MODEL) $(ARGS)
# ── Dependencies ─────────────────────────────────────────────────────────────
repin:
CARGO_BAZEL_REPIN=1 bazel sync --only=crates
# ── Cross Compile ────────────────────────────────────────────────────────────
release-macos-arm:
bazel build //:loopal -c opt --config=macos-arm
release-macos-x86:
bazel build //:loopal -c opt --config=macos-x86
release-linux-arm:
bazel build //:loopal -c opt --config=linux-arm
release-linux-x86:
bazel build //:loopal -c opt --config=linux-x86
release-windows:
bazel build //:loopal -c opt --config=windows-x86
# ── Clean ────────────────────────────────────────────────────────────────────
clean:
bazel clean