github.com/vipernet-xyz/tm@v0.34.24/test/loadtime/Makefile (about)

     1  GOMOD="github.com/vipernet-xyz/tm/test/loadtime"
     2  OUTPUT?=build/
     3  
     4  build:
     5  	go build $(BUILD_FLAGS) -tags '$(BUILD_TAGS)' -o $(OUTPUT)load ./cmd/load/
     6  	go build $(BUILD_FLAGS) -tags '$(BUILD_TAGS)' -o $(OUTPUT)report ./cmd/report/
     7  .PHONY: build
     8  
     9  check-proto-gen-deps:
    10  ifeq (,$(shell which protoc))
    11  	$(error "protoc is required for Protobuf generation. See instructions for your platform on how to install it.")
    12  endif
    13  ifeq (,$(shell which protoc-gen-go))
    14  	$(error "protoc-gen-go is required for Protobuf generation. See instructions for your platform on how to install it.")
    15  endif
    16  .PHONY: check-proto-gen-deps
    17  
    18  check-proto-format-deps:
    19  ifeq (,$(shell which clang-format))
    20  	$(error "clang-format is required for Protobuf formatting. See instructions for your platform on how to install it.")
    21  endif
    22  .PHONY: check-proto-format-deps
    23  
    24  proto-format: check-proto-format-deps
    25  	@echo "Formatting Protobuf files"
    26  	@find . -name '*.proto' -exec clang-format -i {} \;
    27  .PHONY: proto-format
    28  
    29  proto-gen: check-proto-gen-deps
    30  	@echo "Generating Protobuf files"
    31  	@find . -name '*.proto' -exec protoc \
    32  		--go_out=paths=source_relative:. {} \;
    33  .PHONY: proto-gen