Skip to content

Commit

Permalink
Merge pull request #8 from make-files/arm64
Browse files Browse the repository at this point in the history
Use `arm_vX` to specify GOARM version.
  • Loading branch information
jmalloc authored Aug 10, 2021
2 parents fd81de0 + 8d51445 commit 74c7b9a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ GOHOSTARCH := $(shell go env GOHOSTARCH)
GO_MATRIX_OS ?= $(GOHOSTOS)
GO_MATRIX_ARCH ?= $(GOHOSTARCH)

# GO_DEBUG_DIR is the relative path to the debug build directory for the current
# OS & architecture.
GO_DEBUG_DIR=artifacts/build/debug/$(GOHOSTOS)/$(GOHOSTARCH)

# GO_TEST_REQ is a space separated list of prerequisites needed to run tests.
GO_TEST_REQ +=

Expand All @@ -59,6 +63,7 @@ GO_TEST_REQ +=
# GO_TEST_REQ.
GO_BUILD_BEFORE_TEST ?=


################################################################################

# _GO_COMMAND_DIR and _GO_PLUGIN_DIR are the names of directories in the root of
Expand Down Expand Up @@ -194,8 +199,8 @@ artifacts/build/%: $(GO_SOURCE_FILES) $(GENERATED_FILES) $(GO_EMBEDDED_FILES)
$(eval PARTS := $(subst /, ,$*))
$(eval BUILD := $(word 1,$(PARTS)))
$(eval OS := $(word 2,$(PARTS)))
$(eval ARCH := $(patsubst arm%,arm,$(word 3,$(PARTS))))
$(eval GOARM := $(patsubst arm%,%,$(filter arm%,$(word 3,$(PARTS)))))
$(eval ARCH := $(patsubst arm_v%,arm,$(word 3,$(PARTS))))
$(eval GOARM := $(patsubst arm_v%,%,$(filter arm_v%,$(word 3,$(PARTS)))))
$(eval BIN := $(word 4,$(PARTS)))
$(eval MODE := $(if $(filter $(_GO_BUILDMODE_PLUGIN_PATTERNS),$(BIN)),plugin,default))
$(eval PKG := $(if $(findstring plugin,$(MODE)),$(_GO_PLUGIN_DIR),$(_GO_COMMAND_DIR))/$(basename $(BIN)))
Expand Down

0 comments on commit 74c7b9a

Please sign in to comment.