Initial import.
This commit is contained in:
21
proto/Makefile
Normal file
21
proto/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
PROTOFILES = $(wildcard *.proto)
|
||||
GO_TARGETS = $(patsubst %.proto,%.pb.go,$(PROTOFILES))
|
||||
DEBIAN_DEPS = protobuf-compiler protoc-gen-go
|
||||
|
||||
.PHONY: all
|
||||
all: $(GO_TARGETS)
|
||||
|
||||
%.pb.go: %.proto
|
||||
protoc -I=$(PWD) --go_out=$(PWD) $<
|
||||
|
||||
.PHONY: install-debian-deps
|
||||
install-debian-deps:
|
||||
sudo apt-get install $(DEBIAN_DEPS)
|
||||
|
||||
.PHONY: uninstall-debian-deps
|
||||
uninstall-debian-deps:
|
||||
sudo apt-get remove $(DEBIAN_DEPS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.pb.go
|
||||
Reference in New Issue
Block a user