forked from eunomia-bpf/agentsight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 1007 Bytes
/
Makefile
File metadata and controls
40 lines (33 loc) · 1007 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
build: build-frontend build-bpf build-rust
build-frontend:
cd frontend && npm install && npm run build
build-bpf:
make -C bpf
build-rust:
cd collector && cargo build --release
clean:
make -C bpf clean
cd collector && cargo clean
cd frontend && rm -rf .next node_modules dist
install:
sudo apt update
sudo apt-get install -y --no-install-recommends \
libelf1 libelf-dev zlib1g-dev \
make clang llvm
# Install Node.js if not present
@command -v node >/dev/null 2>&1 || { \
echo "Installing Node.js..."; \
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -; \
sudo apt-get install -y nodejs; \
}
# Install Rust if not present
@command -v cargo >/dev/null 2>&1 || { \
echo "Installing Rust..."; \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; \
source ~/.cargo/env; \
}
test:
make -C bpf test
cd collector && cargo test
cd frontend && npm run build
.PHONY: build build-frontend build-bpf build-rust clean install test