forked from microsoft/ethr
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
39 lines (30 loc) · 825 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
38
#!make
#-----------------------------------------------------------------------------
# Copyright (C) Microsoft. All rights reserved.
# Licensed under the MIT license.
# See LICENSE.txt file in the project root for full license information.
#-----------------------------------------------------------------------------
GO_BIN ?= go
GO_LINT ?= golint
GO_FMT ?= gofmt
BINARY_NAME ?= ethr-kai
.PHONY: fmt
fmt:
find . -name '*.go' | \
while read -r file; \
do $(GO_FMT) -w -s "$$file"; \
done
.PHONY: build-docker
build-docker:
$(GO_BIN) build -o /out/$(BINARY_NAME)
.PHONY: build
build:
$(GO_BIN) build -o $(BINARY_NAME) .
.PHONY: lint
lint:
$(GO_LINT) .
fetch-dependency:
$(GO_BIN) mod vendor .
build-with-local-vendor:
$(GO_BIN) build -mod=vendor -o $(BINARY_NAME) .
.DEFAULT_GOAL := build