Skip to content

Commit

Permalink
Add static-binaries target
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Campbell <ijc@docker.com>
  • Loading branch information
ijc committed Aug 8, 2017
1 parent 7709115 commit 7008be8
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Makefile
Expand Up @@ -32,16 +32,17 @@ default: help
help:
@echo "Usage: make <target>"
@echo
@echo " * 'install' - Install binaries to system locations"
@echo " * 'binaries' - Build cri-containerd"
@echo " * 'test' - Test cri-containerd"
@echo " * 'test-cri' - Test cri-containerd with cri validation test"
@echo " * 'clean' - Clean artifacts"
@echo " * 'verify' - Execute the source code verification tools"
@echo " * 'install.tools' - Install tools used by verify"
@echo " * 'install.deps' - Install dependencies of cri-containerd (containerd, runc, cni)"
@echo " * 'uninstall' - Remove installed binaries from system locations"
@echo " * 'version' - Print current cri-containerd release version"
@echo " * 'install' - Install binaries to system locations"
@echo " * 'binaries' - Build cri-containerd"
@echo " * 'static-binaries - Build static cri-containerd"
@echo " * 'test' - Test cri-containerd"
@echo " * 'test-cri' - Test cri-containerd with cri validation test"
@echo " * 'clean' - Clean artifacts"
@echo " * 'verify' - Execute the source code verification tools"
@echo " * 'install.tools' - Install tools used by verify"
@echo " * 'install.deps' - Install dependencies of cri-containerd (containerd, runc, cni)"
@echo " * 'uninstall' - Remove installed binaries from system locations"
@echo " * 'version' - Print current cri-containerd release version"

.PHONY: check-gopath

Expand Down Expand Up @@ -84,6 +85,9 @@ clean:

binaries: cri-containerd

static-binaries: GO_LDFLAGS=--ldflags '-extldflags "-fno-PIC -static"'
static-binaries: cri-containerd

install: check-gopath
install -D -m 755 $(BUILD_DIR)/cri-containerd $(BINDIR)/cri-containerd

Expand Down Expand Up @@ -118,6 +122,7 @@ install.tools: .install.gitvalidation .install.gometalinter

.PHONY: \
binaries \
static-binaries \
boiler \
clean \
default \
Expand Down

0 comments on commit 7008be8

Please sign in to comment.