summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorLantao Liu <lantaol@google.com>2019-09-16 13:19:31 -0700
committerGitHub <noreply@github.com>2019-09-16 13:19:31 -0700
commit3168afab03d52e160f6accaeea8d4ed304c1aba1 (patch)
tree6ff89919935ae542f9d71491a0a8ca80391f33c5 /Makefile
parent9ce9ceaf4e0678e06c5b899825f918b72f4d5889 (diff)
Enable go module by default in the Makefile. (#38)
Signed-off-by: Lantao Liu <lantaol@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f5c0131fa..6336bab87 100644
--- a/Makefile
+++ b/Makefile
@@ -7,16 +7,17 @@ GO_LDFLAGS=-ldflags '-s -w -extldflags "-static"'
SOURCES=$(shell find cmd/ pkg/ -name '*.go')
DEPLOY_PATH=cri-containerd-staging/gvisor-containerd-shim
VERSION=$(shell git rev-parse HEAD)
+GO_MODULE=on
all: binaries
binaries: bin/gvisor-containerd-shim bin/containerd-shim-runsc-v1
bin/gvisor-containerd-shim: $(SOURCES)
- CGO_ENABLED=0 ${GC} build ${GO_BUILD_FLAGS} -o bin/gvisor-containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/gvisor-containerd-shim
+ GO111MODULE=${GO_MODULE} CGO_ENABLED=0 ${GC} build ${GO_BUILD_FLAGS} -o bin/gvisor-containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/gvisor-containerd-shim
bin/containerd-shim-runsc-v1: $(SOURCES)
- CGO_ENABLED=0 ${GC} build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runsc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runsc-v1
+ GO111MODULE=${GO_MODULE} CGO_ENABLED=0 ${GC} build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runsc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runsc-v1
install: bin/gvisor-containerd-shim
mkdir -p $(DESTDIR)/bin