summaryrefslogtreecommitdiff
path: root/example/Makefile
blob: e2673c38b5eec20e1451afaa1e9b3c889e157b06 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)

test: goimports build
	./example

modproto: clean withMutex goimports vet build
	./example

rawproto: clean withoutMutex goimports vet build
	./example

vet:
	@GO111MODULE=off go vet

build:
	GO111MODULE=off go build -v

simple:
	../autogenpb --proto fruit.proto --package main

withMutex:
	../autogenpb --proto fruit.proto --package main
	../autogenpb --proto file.proto --package main
	../autogenpb --proto patchset.proto --package main

withoutMutex:
	../autogenpb --proto fruit.proto --package main --mutex=false
	../autogenpb --proto file.proto --package main --mutex=false
	../autogenpb --proto patchset.proto --package main --mutex=false

goimports:
	goimports -w *.go

clean:
	-rm -f go.*
	-rm -f *.pb.go
	-rm -f testfiles