File: Makefile

package info (click to toggle)
golang-github-checkpoint-restore-go-criu 7.2.0%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 1,796 kB
  • sloc: makefile: 231; ansic: 195; python: 137; sh: 110
file content (42 lines) | stat: -rw-r--r-- 807 bytes parent folder | download
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
39
40
41
42
SHELL = /bin/bash
GO ?= go
CC ?= gcc

all: build

lint:
	golangci-lint run ./...

build: rpc/rpc.pb.go stats/stats.pb.go
	$(GO) build -v ./...
	# Build crit binary
	$(MAKE) -C crit bin/crit

test: build
	$(MAKE) -C test

coverage:
	$(MAKE) -C test coverage

rpc/rpc.proto:
	curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@

rpc/rpc.pb.go: rpc/rpc.proto
	protoc --go_out=. --go_opt=M$^=rpc/ $^

stats/stats.proto:
	curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@

stats/stats.pb.go: stats/stats.proto
	protoc --go_out=. --go_opt=M$^=stats/ $^

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

clean:
	$(MAKE) -C crit/ clean
	$(MAKE) -C test/ clean

.PHONY: build test lint vendor coverage clean