chore: clean ebpf files before compile

This commit is contained in:
mzz2017 2023-01-31 18:33:47 +08:00
parent d5c2648753
commit 7c0c8923aa

View File

@ -22,17 +22,21 @@ else
VERSION ?= unstable-$(date).r$(count).$(commit)
endif
.PHONY: ebpf dae
.PHONY: clean-ebpf ebpf dae
dae: ebpf
go build -o $(OUTPUT) -trimpath -ldflags "-s -w -X github.com/v2rayA/dae/cmd.Version=$(VERSION)" .
clean-ebpf:
rm -f component/control/bpf_bpfe*.go && \
rm -f component/control/bpf_bpfe*.o
# $BPF_CLANG is used in go:generate invocations.
ebpf: export BPF_CLANG := $(CLANG)
ebpf: export BPF_STRIP := $(STRIP)
ebpf: export BPF_CFLAGS := $(CFLAGS)
ebpf: export BPF_GOARCH := $(GOARCH)
ebpf:
ebpf: clean-ebpf
unset GOOS && \
unset GOARCH && \
unset GOARM && \