mirror of
https://github.com/status-im/status-keycard-go.git
synced 2025-01-31 00:28:40 +00:00
add m1 support
This commit is contained in:
parent
622a50e950
commit
0e01f06caf
6
Makefile
6
Makefile
@ -10,6 +10,10 @@ endif
|
|||||||
|
|
||||||
ifeq ($(detected_OS),Darwin)
|
ifeq ($(detected_OS),Darwin)
|
||||||
LIB_EXT := dylib
|
LIB_EXT := dylib
|
||||||
|
ifeq ("$(shell sysctl -nq hw.optional.arm64)","1")
|
||||||
|
# Building on M1 is still not supported, so in the meantime we crosscompile to amd64
|
||||||
|
CGOFLAGS=CGO_ENABLED=1 GOOS=darwin GOARCH=amd64
|
||||||
|
endif
|
||||||
else ifeq ($(detected_OS),Windows)
|
else ifeq ($(detected_OS),Windows)
|
||||||
LIB_EXT:= dll
|
LIB_EXT:= dll
|
||||||
LIBKEYCARD_EXT := dll
|
LIBKEYCARD_EXT := dll
|
||||||
@ -20,6 +24,6 @@ endif
|
|||||||
build-lib:
|
build-lib:
|
||||||
mkdir -p $(BUILD)/libkeycard
|
mkdir -p $(BUILD)/libkeycard
|
||||||
@echo "Building static library..."
|
@echo "Building static library..."
|
||||||
go build -buildmode=c-shared -o $(BUILD)/libkeycard/libkeycard.$(LIB_EXT) .
|
$(CGOFLAGS) go build -buildmode=c-shared -o $(BUILD)/libkeycard/libkeycard.$(LIB_EXT) .
|
||||||
@echo "Static library built:"
|
@echo "Static library built:"
|
||||||
@ls -la $(BUILD)/libkeycard/*
|
@ls -la $(BUILD)/libkeycard/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user