Files
docker-machine/Makefile.inc
Dieter Reuter 0ed89f118d Support building a Linux ARM64/aarch64 binary
In order to support building for Linux on ARM64/aarch64 (64bit) we could easily cross compile Docker Machine. In Go we use "linux/arm64", but on Linux the architecture is called "aarch64" which can be determined with `uname -m`.

Testing a build locally within Docker and only compile an ARM64 binary is easy with this command:

```
USE_CONTAINER=true TARGET_OS=linux TARGET_ARCH=arm64 make build-x
```

It builds the binary `./bin/docker-machine-Linux-aarch64`.

Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
2017-01-21 19:50:21 +01:00

32 lines
828 B
Makefile

# Project name, used to name the binaries
PKG_NAME := docker-machine
# If true, disable optimizations and does NOT strip the binary
DEBUG ?=
# If true, "build" will produce a static binary (cross compile always produce static build regardless)
STATIC ?=
# If true, turn on verbose output for build
VERBOSE ?=
# Build tags
BUILDTAGS ?=
# Adjust number of parallel builds (XXX not used)
PARALLEL ?= -1
# Coverage default directory
COVERAGE_DIR ?= cover
# Whether to perform targets inside a docker container, or natively on the host
USE_CONTAINER ?=
# List of cross compilation targets
ifeq ($(TARGET_OS),)
TARGET_OS := darwin linux windows
endif
ifeq ($(TARGET_ARCH),)
TARGET_ARCH := amd64 arm arm64 386
endif
# Output prefix, defaults to local directory if not specified
ifeq ($(PREFIX),)
PREFIX := $(shell pwd)
endif