emit license

This commit is contained in:
2025-08-30 22:33:58 +05:30
parent b8ef7cc945
commit b4a2f169ad
5 changed files with 47 additions and 21 deletions

View File

@ -3,13 +3,17 @@ CFLAGS := -O2 -emit-llvm -target bpf -c
SRC := example.bpf.c
OUT := example.bpf.ll
OBJECT := example.bpf.o
.PHONY: all clean
all: $(OUT)
object: $(SRC)
$(BPF_CLANG) $(CFLAGS) $< -o $(OBJECT)
$(OUT): $(SRC)
$(OUT): $(SRC) object
$(BPF_CLANG) $(CFLAGS) -S $< -o $@
clean:
rm -f $(OUT)
rm -f $(OUT) $(OBJECT)

View File

@ -1,8 +1,8 @@
from pythonbpf.decorators import tracepoint, license
from pythonbpf.decorators import tracepoint
@tracepoint("syscalls:sys_enter_execve")
def trace_execve(ctx) -> int:
print("execve called\n")
return 0
license("GPL")
LICENSE = "GPL"