From 462bafb2e7a4d56b788a7467a9e7c05604f55a15 Mon Sep 17 00:00:00 2001 From: brb-g <45642843+brb-g@users.noreply.github.com> Date: Tue, 13 Aug 2019 16:25:09 -0700 Subject: Add variable controlling the go binary path. (#35) --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f7b4d02df..8cc3cba83 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # Base path used to install. DESTDIR=/usr/local +GC=go GO_BUILD_FLAGS= GO_TAGS= GO_LDFLAGS=-ldflags '-s -w -extldflags "-static"' @@ -12,10 +13,10 @@ all: binaries binaries: bin/gvisor-containerd-shim bin/containerd-shim-runsc-v1 bin/gvisor-containerd-shim: $(SOURCES) - CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/gvisor-containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/gvisor-containerd-shim + 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 go build ${GO_BUILD_FLAGS} -o bin/containerd-shim-runsc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runsc-v1 + 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 -- cgit v1.2.3