plugeth-statediff/Makefile

25 lines
607 B
Makefile
Raw Normal View History

MOCKGEN ?= mockgen
MOCKS_DIR := $(CURDIR)/test_helpers/mocks
2024-03-28 10:09:04 +00:00
BUILD_DIR ?= ./build
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-image: mocks
docker build . -t "cerc/plugeth-statediff:local" \
--build-arg GIT_VDBTO_TOKEN
.PHONY: docker-image
# Local build
BUILD_FLAGS := --trimpath
2024-03-28 10:09:04 +00:00
plugin: $(BUILD_DIR)/lib/statediff.so
.PHONY: plugin
2024-03-28 10:09:04 +00:00
$(BUILD_DIR)/lib/statediff.so: ./**/*.go
go build --tags linkgeth --buildmode=plugin -o $@ $(BUILD_FLAGS) ./main