summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9ae2c2e1cc6ac356dd03b4242b7cfc7d07072c53 (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
.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 .
	ruff format wrappers/python/eduvpn_common

lint:
	golangci-lint run -E stylecheck,revive,gocritic ./...
	ruff check wrappers/python/eduvpn_common
	ruff format --check wrappers/python/eduvpn_common

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

test:
	go test ./...

clean:
	rm -rf lib
	go clean