Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.o
*.d
*.pb.go
.cache
/.idea
Expand Down
11 changes: 6 additions & 5 deletions support/ebpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ FLAGS=$(TARGET_FLAGS) -g \

SRCS := $(wildcard *.ebpf.c)
OBJS := $(SRCS:.c=.$(TARGET_ARCH).o)
DEPS := $(OBJS:.o=.d)

.DEFAULT_GOAL := all

Expand All @@ -62,10 +63,8 @@ arm64:
errors.h: ../../tools/errors-codegen/errors.json
go run ../../tools/errors-codegen/main.go bpf $@

%.ebpf.c: errors.h ;
Comment thread
florianl marked this conversation as resolved.

%.ebpf.$(TARGET_ARCH).o: %.ebpf.c
$(BPF_CLANG) $(FLAGS) -o $@
%.ebpf.$(TARGET_ARCH).o: %.ebpf.c errors.h
Comment thread
christos68k marked this conversation as resolved.
$(BPF_CLANG) $(FLAGS) -MMD -MP -o $@

$(TRACER_NAME): $(OBJS)
$(BPF_LINK) $^ -o - | $(LLC) -march=bpf -mcpu=v2 -filetype=obj -o $@
Expand All @@ -88,4 +87,6 @@ format:
$(CLANG_FORMAT) -i -style=file *.[ch]

clean:
rm -f *.o
rm -f *.o *.d

-include $(DEPS)