summaryrefslogtreecommitdiffhomepage
path: root/src/event/quic/bpf/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/quic/bpf/makefile')
-rw-r--r--src/event/quic/bpf/makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/event/quic/bpf/makefile b/src/event/quic/bpf/makefile
new file mode 100644
index 000000000..b4d758f33
--- /dev/null
+++ b/src/event/quic/bpf/makefile
@@ -0,0 +1,30 @@
+CFLAGS=-O2 -Wall
+
+LICENSE=BSD
+
+PROGNAME=ngx_quic_reuseport_helper
+RESULT=ngx_event_quic_bpf_code
+DEST=../$(RESULT).c
+
+all: $(RESULT)
+
+$(RESULT): $(PROGNAME).o
+ LICENSE=$(LICENSE) PROGNAME=$(PROGNAME) bash ./bpfgen.sh $< > $@
+
+DEFS=-DPROGNAME=\"$(PROGNAME)\" \
+ -DLICENSE_$(LICENSE) \
+ -DLICENSE=\"$(LICENSE)\" \
+
+$(PROGNAME).o: $(PROGNAME).c
+ clang $(CFLAGS) $(DEFS) -target bpf -c $< -o $@
+
+install: $(RESULT)
+ cp $(RESULT) $(DEST)
+
+clean:
+ @rm -f $(RESULT) *.o
+
+debug: $(PROGNAME).o
+ llvm-objdump -S -no-show-raw-insn $<
+
+.DELETE_ON_ERROR: