summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c39d6e06ce2f8ea5bf29d82efed57670781167b1 (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
GO ?= go

all: build build-cross

define go-build
	GOOS=$(1) GOARCH=$(2) $(GO) build ${BUILDFLAGS} ./...
endef

.PHONY: build
build:
	$(call go-build,linux,amd64)

.PHONY: build-cross
build-cross:
	$(call go-build,linux,386)
	$(call go-build,linux,arm)
	$(call go-build,linux,arm64)
	$(call go-build,linux,ppc64le)
	$(call go-build,linux,s390x)
	$(call go-build,linux,mips64le)
	$(call go-build,windows,amd64)
	$(call go-build,windows,386)


.PHONY: test
test:
	go test -timeout 3m ${TESTFLAGS} -v ./...

.PHONY: lint
lint:
	golangci-lint run

.PHONY: vendor
vendor:
	$(GO) mod tidy
	$(GO) mod verify