From 9d46b84dee646b19a75b481b66f7ea5e9263384e Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Sun, 27 Aug 2023 12:28:55 +0200 Subject: [PATCH] Fix iOS builds --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a5b7f3a..5588b24 100644 --- a/Makefile +++ b/Makefile @@ -129,17 +129,21 @@ else ifneq (,$(findstring ios,$(platform))) ifeq ($(platform),ios-arm64) CC = cc -arch arm64 -isysroot $(IOSSDK) + CXX = c++ -arch arm64 -isysroot $(IOSSDK) else CC = cc -arch armv7 -isysroot $(IOSSDK) + CXX = c++ -arch armv7 -isysroot $(IOSSDK) endif CFLAGS += -DIOS -DHAVE_POSIX_MEMALIGN -marm -ifeq ($(platform),$(filter $(platform),ios9 ios-arm64)) - CC += -miphoneos-version-min=8.0 - CFLAGS += -miphoneos-version-min=8.0 -else - CC += -miphoneos-version-min=5.0 - CFLAGS += -miphoneos-version-min=5.0 -endif + + ifeq ($(platform),$(filter $(platform),ios9 ios-arm64)) + MINVERSION = -miphoneos-version-min=8.0 + else + MINVERSION = -miphoneos-version-min=5.0 + endif + SHARED += $(MINVERSION) + CC += $(MINVERSION) + CXX += $(MINVERSION) # tvOS else ifeq ($(platform), tvos-arm64)