summaryrefslogtreecommitdiff
path: root/vendor/github.com/checkpoint-restore/go-criu/Makefile
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-24 16:52:02 +0200
committerGitHub <noreply@github.com>2019-06-24 16:52:02 +0200
commit72260a296c534950d9c899ee907e73b5dd0162f0 (patch)
treed9b33042a70c2d1e600c75855a29b3aa594aaab6 /vendor/github.com/checkpoint-restore/go-criu/Makefile
parentcf244d87cdb9b2cb0d8510b2ea392d928c1eb269 (diff)
parentd697456dc90adbaf68224ed7c115b38d5855e582 (diff)
downloadpodman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.gz
podman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.bz2
podman-72260a296c534950d9c899ee907e73b5dd0162f0.zip
Merge pull request #3414 from vrothberg/go-modules
Go modules
Diffstat (limited to 'vendor/github.com/checkpoint-restore/go-criu/Makefile')
-rw-r--r--vendor/github.com/checkpoint-restore/go-criu/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/vendor/github.com/checkpoint-restore/go-criu/Makefile b/vendor/github.com/checkpoint-restore/go-criu/Makefile
new file mode 100644
index 000000000..ee44ee448
--- /dev/null
+++ b/vendor/github.com/checkpoint-restore/go-criu/Makefile
@@ -0,0 +1,60 @@
+GO ?= go
+CC ?= gcc
+ifeq ($(GOPATH),)
+export GOPATH := $(shell $(GO) env GOPATH)
+endif
+FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH)))
+GOBIN := $(shell $(GO) env GOBIN)
+ifeq ($(GOBIN),)
+ GOBIN := $(FIRST_GOPATH)/bin
+endif
+
+all: build test phaul phaul-test
+
+lint:
+ @golint . test phaul
+build:
+ @$(GO) build -v
+
+test/piggie: test/piggie.c
+ @$(CC) $^ -o $@
+
+test/test: test/main.go
+ @$(GO) build -v -o test/test test/main.go
+
+test: test/test test/piggie
+ mkdir -p image
+ test/piggie
+ test/test dump `pidof piggie` image
+ test/test restore image
+ pkill -9 piggie || :
+
+phaul:
+ @cd phaul; go build -v
+
+test/phaul: test/phaul-main.go
+ @$(GO) build -v -o test/phaul test/phaul-main.go
+
+phaul-test: test/phaul test/piggie
+ rm -rf image
+ test/piggie
+ test/phaul `pidof piggie`
+ pkill -9 piggie || :
+
+clean:
+ @rm -f test/test test/piggie test/phaul
+ @rm -rf image
+ @rm -f rpc/rpc.proto
+
+install.tools:
+ if [ ! -x "$(GOBIN)/golint" ]; then \
+ $(GO) get -u golang.org/x/lint/golint; \
+ fi
+
+rpc/rpc.proto:
+ curl -s https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@
+
+rpc/rpc.pb.go: rpc/rpc.proto
+ protoc --go_out=. $^
+
+.PHONY: build test clean lint phaul