forked from microsoft/moc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 782 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
32
33
34
35
36
37
# Copyright (c) Microsoft Corporation.
# Licensed under the Apache v2.0 license.
GOCMD=GO111MODULE=on GOARCH=amd64 go
GOBUILD=$(GOCMD) build -v #-mod=vendor
GOTEST=$(GOCMD) test -v
GOHOSTOS=$(strip $(shell $(GOCMD) env get GOHOSTOS))
# Private repo workaround
export GOPRIVATE = github.com/microsoft
# Active module mode, as we use go modules to manage dependencies
export GO111MODULE=on
#
PKG :=
all: format test unittest
.PHONY: vendor
vendor:
go mod tidy
format:
gofmt -s -w rpc/ pkg/
bootstrap:
GOOS="linux" go get -u google.golang.org/[email protected]
GOOS="linux" go get -u github.com/golang/protobuf/[email protected]
test:
GOOS=windows go build ./...
unittest:
$(GOTEST) ./pkg/marshal
$(GOTEST) ./pkg/config
generate: bootstrap
(cd rpc && ./gen_proto.sh)