build(make): support darwin cross-compile

(cherry picked from commit 4f0d463d49)
This commit is contained in:
Firas al-Khalil 2024-09-17 10:01:54 +02:00 committed by Amaan Qureshi
parent b4d4251427
commit 6813e8d5c1

View file

@ -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)