forked from ionorg/ion-sfu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (22 loc) · 842 Bytes
/
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
GO_LDFLAGS = -ldflags "-s -w"
GO_VERSION = 1.14
GO_TESTPKGS:=$(shell go list ./... | grep -v cmd | grep -v examples)
all: nodes
go_init:
go mod download
go generate ./...
clean:
rm -rf bin
protos:
docker build -t protoc-builder ./cmd/signal/grpc/proto && docker run -v $(CURDIR):/workspace protoc-builder protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative cmd/signal/grpc/proto/sfu.proto
build_grpc: go_init
go build -o bin/sfu-grpc $(GO_LDFLAGS) ./cmd/signal/grpc/main.go
build_jsonrpc: go_init
go build -o bin/sfu-json-rpc $(GO_LDFLAGS) ./cmd/signal/json-rpc/main.go
build_allrpc: go_init
go build -o bin/sfu-allrpc $(GO_LDFLAGS) ./cmd/signal/allrpc/main.go
test: go_init
go test \
-timeout 120s \
-coverprofile=cover.out -covermode=atomic \
-v -race ${GO_TESTPKGS}