From 6813e8d5c1fcf151151299f40ae66ac8191f230f Mon Sep 17 00:00:00 2001 From: Firas al-Khalil Date: Tue, 17 Sep 2024 10:01:54 +0200 Subject: [PATCH] build(make): support darwin cross-compile (cherry picked from commit 4f0d463d49a3f1f2a6eaa75ecc284a5719aad94e) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 465f940d..d5a7a1eb 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) # OS-specific bits -ifeq ($(shell uname),Darwin) +ifneq ($(findstring darwin,$(shell $(CC) -dumpmachine)),) SOEXT = dylib SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT)