-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
33 lines (28 loc) · 1008 Bytes
/
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
all: build-ebpf build run
build-ebpf:
mkdir -p ebpf/bin
clang -D__KERNEL__ -D__ASM_SYSREG_H \
-Wno-unused-value \
-Wno-pointer-sign \
-Wno-compare-distinct-pointer-types \
-Wunused \
-Wall \
-Werror \
-I/lib/modules/$$(uname -r)/build/include \
-I/lib/modules/$$(uname -r)/build/include/uapi \
-I/lib/modules/$$(uname -r)/build/include/generated/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/uapi \
-I/lib/modules/$$(uname -r)/build/arch/x86/include/generated \
-O2 -emit-llvm \
ebpf/main.c \
-c -o - | llc -march=bpf -filetype=obj -o ebpf/bin/probe.o
go-bindata -pkg assets -prefix "ebpf/bin" -o "pkg/assets/probe.go" "ebpf/bin/probe.o"
build:
go build -o bin/ ./...
run:
sudo --preserve-env=SSH_PROBE_SECRETS ./bin/ssh-probe --profiles ./profiles/vagrant.yaml --access-control-events-level allow --agent-url "127.0.0.1:10518"
install:
sudo cp ./bin/ssh-probe* /usr/bin/
run_agent:
docker-compose up