diff --git a/plugins/edriver/Makefile b/plugins/edriver/Makefile index e8531a32..db6d91d5 100644 --- a/plugins/edriver/Makefile +++ b/plugins/edriver/Makefile @@ -6,14 +6,19 @@ EBPF_TARGET_PATH = user/hades_ebpf_driver.o GO_TARGET_PATH := -o edriver VERSION := v1.1.1 -no-core: +.PHONY: mod-tidy +mod-tidy: + @echo "Running go mod tidy..." + go mod tidy + +no-core: mod-tidy $(EBPF_BUILD) mv $(EBPF_SOURCE_PATH) $(EBPF_TARGET_PATH) CGO_ENABLED=0 go build -ldflags "-X 'hades-ebpf/conf.VERSION=$(VERSION)'" $(GO_TARGET_PATH) . -core: +core: mod-tidy $(EBPF_BUILD) $(EBPF_CO-RE_FLAG) mv $(EBPF_SOURCE_CO-RE_PATH) $(EBPF_TARGET_PATH) CGO_ENABLED=0 go build -ldflags "-X 'hades-ebpf/conf.VERSION=$(VERSION)'" $(GO_TARGET_PATH) . -testing: +testing: mod-tidy cp $(EBPF_TARGET_PATH) test/hades_ebpf_driver.o CGO_ENABLED=0 go test -v -exec sudo ./... \ No newline at end of file