Makefile: Use STRIP variable with strip as default (#475)

If we run make in a cross-compile environment where the strip binary we
want to use is something else than strip, it is useful to have a STRIP
variable in the Makefile. If STRIP is not set, the default value is the
common strip.

Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
This commit is contained in:
Joakim Roubert 2020-04-14 23:03:33 +02:00 committed by GitHub
parent d27b79cd7a
commit 444174a194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ ifndef PACKAGE_VERSION
PACKAGE_VERSION = $(shell git rev-parse --short HEAD)
endif
STRIP ?= strip
PROFILING = profiling
TARGET_BIN = $(TARGET)/linkerd2-proxy
PKG_ROOT = $(TARGET)/package
@ -43,7 +44,7 @@ $(PKG_ROOT)/$(PKG): $(TARGET_BIN)
mkdir -p $(PKG_BASE)/bin
cp LICENSE $(PKG_BASE)
cp $(TARGET_BIN) $(PKG_BASE)/bin/linkerd2-proxy
strip $(PKG_BASE)/bin/linkerd2-proxy
$(STRIP) $(PKG_BASE)/bin/linkerd2-proxy
ifdef CARGO_DEBUG
if which objcopy >/dev/null ; then \
objcopy $(TARGET_BIN) $(PKG_BASE)/linkerd2-proxy.obj ; \