Skip to content

Instantly share code, notes, and snippets.

@kylelemons
Created October 20, 2011 18:27
Show Gist options
  • Save kylelemons/1301885 to your computer and use it in GitHub Desktop.
Save kylelemons/1301885 to your computer and use it in GitHub Desktop.
A Makefile for protocol buffers in Go
include $(GOROOT)/src/Make.inc
PROTOFILES=$(wildcard *.proto)
GOPROTOFILES=$(patsubst %.proto,%.pb.go,$(PROTOFILES))
TARG=protopackage
GOFILES=\
$(GOPROTOFILES)\
CLEANFILES+=$(GOPROTOFILES)
include $(GOROOT)/src/Make.pkg
$(GOPROTOFILES) : $(PROTOFILES)
protoc --go_out=. $^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment