From 40d1c03598e2c665aec5bde579391b017c6b37c5 Mon Sep 17 00:00:00 2001 From: yoshisuga Date: Tue, 17 Sep 2019 18:43:22 -0700 Subject: [PATCH] Libretro: support building for iOS and tvOS (#652) * libretro: support building for 64-bit iOS devices (arm64) * (tvOS) add support for building using tvOS SDK --- Libretro/Makefile | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Libretro/Makefile b/Libretro/Makefile index 8ffd2d81..ea51ef6d 100644 --- a/Libretro/Makefile +++ b/Libretro/Makefile @@ -126,14 +126,29 @@ ifeq ($(IOSSDK),) endif DEFINES := -DIOS +ifeq ($(platform), ios-arm64) + CC = cc -arch arm64 -isysroot $(IOSSDK) -stdlib=libc++ +else CC = cc -arch armv7 -isysroot $(IOSSDK) -ifeq ($(platform),ios9) +endif +ifeq ($(platform),$(filter $(platform),ios9 ios-arm64)) CC += -miphoneos-version-min=8.0 CXXFLAGS += -miphoneos-version-min=8.0 else CC += -miphoneos-version-min=5.0 CXXFLAGS += -miphoneos-version-min=5.0 endif + +else ifeq ($(platform), tvos-arm64) + TARGET := $(TARGET_NAME)_libretro_tvos.dylib + fpic := -fPIC + SHARED := -dynamiclib + DEFINES := -DIOS -stdlib=libc++ + +ifeq ($(IOSSDK),) + IOSSDK := $(shell xcodebuild -version -sdk appletvos Path) +endif + else ifneq (,$(findstring qnx,$(platform))) TARGET := $(TARGET_NAME)_libretro_qnx.so fpic := -fPIC