Skip to content

Commit

Permalink
Add darwin arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Haist committed Aug 24, 2024
1 parent 6630a57 commit 242e416
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ include 3rdparty.mk
GOROOT ?= $(firstword \
$(patsubst %,/usr/lib/go-%,\
$(shell echo $(patsubst /usr/lib/go-%,%,$(wildcard /usr/lib/go-*)) \
| tr ' ' '\n' \
| sort -rV))\
| tr ' ' '\n' \
| sort -rV))\
$(shell go env GOROOT))

NAMESPACE := $(shell awk '/^module / {print $$2}' go.mod)
Expand Down Expand Up @@ -51,14 +51,15 @@ $(foreach arch,$(ARCHS),\
$(eval _build/$(arch)/%: private export PKG_CONFIG_PATH=$(CURDIR)/_3rdparty/tgt/$(arch)/lib/pkgconfig)\
$(eval _build/$(arch)/%: private export GOOS=\
$(or $(if $(findstring linux,$(arch)),linux),\
$(if $(findstring mingw,$(arch)),windows),\
$(if $(findstring darwin,$(arch)),darwin),\
$(if $(findstring freebsd,$(arch)),freebsd),\
$(error Could not derive GOOS from $(arch))))\
$(if $(findstring mingw,$(arch)),windows),\
$(if $(findstring darwin,$(arch)),darwin),\
$(if $(findstring freebsd,$(arch)),freebsd),\
$(error Could not derive GOOS from $(arch))))\
$(eval _build/$(arch)/%: private export GOARCH=\
$(or $(if $(findstring x86_64,$(arch)),amd64),\
$(if $(or $(findstring i386,$(arch)),$(findstring i686,$(arch))),386),\
$(error Could not derive GOARCH from $(arch)))))
$(if $(findstring arm64,$(arch)),arm64),\
$(if $(or $(findstring i386,$(arch)),$(findstring i686,$(arch))),386),\
$(error Could not derive GOARCH from $(arch)))))

$(if $(findstring linux,$(3rdparty_NATIVE_ARCH)),\
$(eval unit-test: private export CC=x86_64-linux-musl-gcc)\
Expand Down

0 comments on commit 242e416

Please sign in to comment.