summaryrefslogtreecommitdiff
path: root/Makefile
blob: e72789f94a2ec74eb02b47aeb4933bd2ed0274e9 (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
.DEFAULT_GOAL := build
.PHONY: build fmt cli clean


VERSION := $(shell grep -o 'const Version = "[^"]*' internal/version/version.go | cut -d '"' -f 2)


build:
	CGO_ENABLED="1" go build -o lib/libeduvpn_common-${VERSION}.so -buildmode=c-shared ./exports

fmt:
	gofumpt -w .

lint:
	golangci-lint run -E stylecheck,revive,gocritic ./...

cli:
	go build -o eduvpn-common-cli ./cmd/cli

test:
	go test -race ./...

clean:
	rm -rf lib
	go clean