-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 1.02 KB
/
Makefile
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
COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z)
CPP = $(shell which cpp)
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
.PHONY: all
all: build
.PHONY: build
build:
mkdir -p ./bin
go build -o ./bin/slim cmd/slim/slim.go
go build -o ./bin/spindle cmd/spindle/spindle.go
go build -o ./bin/spindle-server cmd/server/server.go
go build -o ./bin/compat-gen cmd/gen/gen.go
go build -o ./bin/compat-cli cmd/client/client.go
go build -o ./bin/fs-record cmd/record/record.go
.PHONY: protoc
protoc: $(LOCALBIN)
GOBIN=$(LOCALBIN) go install google.golang.org/protobuf/cmd/[email protected]
GOBIN=$(LOCALBIN) go install google.golang.org/grpc/cmd/[email protected]
# You can use make protoc to download proto
# This will generate the protos in "protos"
.PHONY: proto
proto: protoc
PATH=$(LOCALBIN):${PATH} protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative protos/compatibility.proto
.PHONY: test
test:
bats -t test/bats/cli.bats