forked from cosmorse/protoc-gen-ego
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (16 loc) · 639 Bytes
/
Makefile
File metadata and controls
22 lines (16 loc) · 639 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SOURCES=$(shell find . -name "*.go")
TEST_PROTO_FILES=$(shell find testdata -name "*.proto")
protoc-gen-ego: $(SOURCES)
go build -ldflags '-s -w' -o $@ .
.PHONY: install
install: $(SOURCES)
go install -ldflags '-s -w'
.PHONY: desc
desc: ./testdata/message.proto
protoc --proto_path=./testdata --plugin=protoc-gen-ego=./gen_desc --ego_out=paths=source_relative,enum=camelcase:./testdata message.proto
.PHONY: test
test: protoc-gen-ego $(TEST_PROTO_FILES)
protoc --proto_path=. --plugin=protoc-gen-ego=./protoc-gen-ego --ego_out=paths=source_relative,enum=camelcase:. $(TEST_PROTO_FILES)
.PHONY: clean
clean:
@rm -f protoc-gen-ego