chore: add protobuf
This commit is contained in:
17
Makefile
17
Makefile
@@ -1,10 +1,21 @@
|
||||
all: avro flatbuffers protobuf
|
||||
|
||||
avro: twt-avro/gen.go
|
||||
twt-avro/gen.go: lextwt.avro
|
||||
go tool avro gen -pkg twt_avro -encoders lextwt.avro > twt-avro/gen.go
|
||||
|
||||
|
||||
flatbuffers: twt-fbs/gen.go
|
||||
twt-fbs/gen.go: lextwt.fbs
|
||||
flatbuffers: twt-fbs/lextwt
|
||||
twt-fbs/lextwt: lextwt.fbs
|
||||
flatc -o twt-fbs --go lextwt.fbs
|
||||
|
||||
.ALL: avro flatbuffers
|
||||
protobuf: twt-pb/lextwt.pb.go
|
||||
twt-pb/lextwt.pb.go: lextwt.proto
|
||||
protoc --proto_path=. \
|
||||
--plugin=bin/protoc-gen-go \
|
||||
--go_opt=paths=source_relative \
|
||||
--go_opt="Mlextwt.proto=go.sour.is/lextwt-encoding/twt-pb;twt_pb" \
|
||||
--go_out=twt-pb \
|
||||
lextwt.proto
|
||||
|
||||
.PHONY: avro protobuf flatbuffers
|
||||
Reference in New Issue
Block a user