Merge pull request #750 from yoshisuga/ios_tvos_platform

(iOS/tvOS) support building
This commit is contained in:
Twinaphex 2019-09-11 06:41:02 +02:00 committed by GitHub
commit e8b7131141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,13 +124,18 @@ else ifneq (,$(findstring ios,$(platform)))
TARGET = $(TARGET_NAME)_libretro_ios.dylib
fpic = -fPIC
LDFLAGS += $(fpic) -dynamiclib
PLATCFLAGS += -D__IOS__
PLATCFLAGS += -D__IOS__ -Wcast-align -Wall -Wno-error=implicit-function-declaration
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
LD = cc -arch arm64 -isysroot $(IOSSDK)
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
LD = cc -arch armv7 -isysroot $(IOSSDK)
ifeq ($(platform),ios9)
endif
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
fpic += -miphoneos-version-min=8.0
CC += -miphoneos-version-min=8.0
LD += -miphoneos-version-min=8.0
@ -140,6 +145,16 @@ else
LD += -miphoneos-version-min=5.0
endif
# tvOS
else ifeq ($(platform), tvos-arm64)
TARGET = $(TARGET_NAME)_libretro_tvos.dylib
fpic = -fPIC
LDFLAGS += $(fpic) -dynamiclib
PLATCFLAGS += -D__IOS__ -Wcast-align -Wall -Wno-error=implicit-function-declaration
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
endif
# 3DS
else ifeq ($(platform), ctr)
TARGET = $(TARGET_NAME)_libretro_$(platform).a