2023-06-23 12:42:55 +00:00
|
|
|
MOCKGEN ?= mockgen
|
|
|
|
MOCKS_DIR := $(CURDIR)/test_helpers/mocks
|
2024-04-13 10:36:15 +00:00
|
|
|
BUILD_DIR ?= ./build
|
2023-06-23 12:42:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-06-24 05:00:21 +00:00
|
|
|
docker-image: mocks
|
2023-09-20 03:22:15 +00:00
|
|
|
docker build . -t "cerc/plugeth-statediff:local" \
|
|
|
|
--build-arg GIT_VDBTO_TOKEN
|
2023-06-24 05:00:21 +00:00
|
|
|
.PHONY: docker-image
|
|
|
|
|
|
|
|
# Local build
|
|
|
|
BUILD_FLAGS := --trimpath
|
|
|
|
|
2024-04-13 10:36:15 +00:00
|
|
|
plugin: $(BUILD_DIR)/lib/statediff.so
|
2023-06-24 05:00:21 +00:00
|
|
|
.PHONY: plugin
|
|
|
|
|
2024-04-13 10:36:15 +00:00
|
|
|
$(BUILD_DIR)/lib/statediff.so: ./**/*.go
|
2023-06-24 05:00:21 +00:00
|
|
|
go build --tags linkgeth --buildmode=plugin -o $@ $(BUILD_FLAGS) ./main
|