blob: eb4a3f9e805bf6ab900ce4150c7559bc36bbe92a (
plain)
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
|
#
# Use protoc-gen-go from pinned github.com/golang/protobuf.
#
PROTOC_GEN_GO_DIR:=vendor/github.com/golang/protobuf/protoc-gen-go
PROTOC_GEN_GO:=$(PROTOC_GEN_GO_DIR)/protoc-gen-go
PROTOCPLUGIN:=--plugin=$(PROTOC_GEN_GO)
PROTOCFLAGS:=$(PROTOCPLUGIN) --go_out=plugins=grpc:api -I api
PROTOC_SRC:= \
api/attribute.proto \
api/capability.proto \
api/gobgp.proto
PROTOC_GEN:=$(PROTOC_SRC:.proto=.pb.go)
all: $(PROTOC_GEN)
maintainer-clean:
$(RM) $(PROTOC_GEN)
$(PROTOC_GEN): $(PROTOC_GEN_GO) $(PROTOC_SRC)
protoc $(PROTOCFLAGS) $(PROTOC_SRC)
$(PROTOC_GEN_GO):
cd $(PROTOC_GEN_GO_DIR) && go build
|