2023-06-23 12:42:55 +00:00
|
|
|
MOCKGEN ?= mockgen
|
|
|
|
MOCKS_DIR := $(CURDIR)/test_helpers/mocks
|
|
|
|
|
|
|
|
mocks: $(MOCKS_DIR)/gen_backend.go
|
|
|
|
.PHONY: mocks
|
|
|
|
|
|
|
|
$(MOCKS_DIR)/gen_backend.go:
|
|
|
|
$(MOCKGEN) --package mocks --destination $@ \
|
|
|
|
github.com/openrelayxyz/plugeth-utils/core Backend,Downloader
|
|
|
|
|
|
|
|
docker: mocks
|
|
|
|
docker build . -t "cerc/plugeth-statediff:local"
|
|
|
|
.PHONY: docker
|
2023-06-30 05:56:12 +00:00
|
|
|
|
|
|
|
# Local build
|
|
|
|
BUILD_FLAGS := --trimpath
|
|
|
|
|
|
|
|
plugin: build/statediff.so
|
|
|
|
.PHONY: plugin
|
|
|
|
|
|
|
|
build/statediff.so: ./**/*.go
|
|
|
|
go build --tags linkgeth --buildmode=plugin -o $@ $(BUILD_FLAGS) ./main
|