From 4f0d463d49a3f1f2a6eaa75ecc284a5719aad94e 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 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70cc7b15..4127acd3 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,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)