-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 823 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 823 Bytes
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
PROTOC=protoc
LDFLAGS+=-L/usr/local/lib `pkg-config --libs protobuf grpc++`
CPPFLAGS+=`pkg-config --cflags protobuf grpc`
CXXFLAGS+=-std=c++14 -I.
.DEFAULT_GOAL := KVStoreApp
KVStoreApp: \
github.com/gogo/protobuf/gogoproto/gogo.pb.o \
github.com/tendermint/tendermint/libs/common/types.pb.o \
github.com/tendermint/tendermint/crypto/merkle/merkle.pb.o \
github.com/tendermint/tendermint/abci/types/types.pb.o \
github.com/tendermint/tendermint/abci/types/types.grpc.pb.o \
main.o KVStoreApp.o
$(CXX) $^ $(LDFLAGS) -o $@
.PRECIOUS: %.grpc.pb.cc
%.grpc.pb.cc: %.proto
$(PROTOC) --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` $<
.PRECIOUS: %.pb.cc
%.pb.cc: %.proto
$(PROTOC) --cpp_out=. $<
.PHONY: clean
clean:
rm main && find . \( -name "*.o" -or -name "*.pb.cc" -or -name "*.pb.h" \) -delete