-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
36 lines (32 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
########################################################################################################################
# Copyright (c) 2018 IoTeX
# This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
# warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
# permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache
# License 2.0 that can be found in the LICENSE file.
########################################################################################################################
# Go parameters
GOCMD=go
GOLINT=golint
GOBUILD=$(GOCMD) build
GOINSTALL=$(GOCMD) install
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
PKG_PATH=/github.com/iotexproject/iotex-proto/golang
.PHONY: gogen
gogen:
@mkdir -p ./temp
@protoc --go_out=./temp --go-grpc_out=require_unimplemented_servers=false:./temp ./proto/types/*
@protoc --go_out=./temp --go-grpc_out=require_unimplemented_servers=false:./temp ./proto/rpc/*
@protoc --go_out=./temp --go-grpc_out=require_unimplemented_servers=false:./temp ./proto/testing/*
@protoc -I. -I./proto/types --go_out=./temp --go-grpc_out=require_unimplemented_servers=false:./temp ./proto/api/*
@protoc -I. --grpc-gateway_out=logtostderr=true:./temp ./proto/api/*
@rm -rf ./golang/iotexapi ./golang/iotexrpc ./golang/iotextypes ./golang/testingpb
@cp -r ./temp/${PKG_PATH}/* ./golang
@rm -rf ./temp
.PHONY: mockgen
mockgen:
@./misc/scripts/mockgen.sh
.PHONY: gen
gen: gogen mockgen