summaryrefslogtreecommitdiff
path: root/src/ebpf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/ebpf/Makefile')
-rw-r--r--src/ebpf/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ebpf/Makefile b/src/ebpf/Makefile
new file mode 100644
index 000000000..5b80c32d7
--- /dev/null
+++ b/src/ebpf/Makefile
@@ -0,0 +1,16 @@
+#clang -target bpf -O2 -c xdp-drop-ebpf.c -o xdp-drop-ebpf.o
+
+src = $(wildcard *.c)
+obj = $(src:.c=.o)
+CLANG = clang
+CFLAGS = -Wall -Wno-unused-value -Wno-pointer-sign -Wno-compare-distinct-pointer-types -Werror -O2
+
+%.o: %.c
+ $(CLANG) -target bpf $(CFLAGS) -o $@ -c $<
+
+.PHONY: all
+all: $(obj)
+
+.PHONY: clean
+clean:
+ rm -f *.o