Add ios targets

This commit is contained in:
twinaphex 2021-03-14 11:24:11 +01:00
parent 8b419e5547
commit bb5871e561
2 changed files with 196 additions and 14 deletions

View File

@ -91,7 +91,11 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/android-jni.yml'
# iOS 9
# iOS
- project: 'libretro-infrastructure/ci-templates'
file: '/ios-arm64.yml'
# iOS (armv7)
- project: 'libretro-infrastructure/ci-templates'
file: '/ios9.yml'
@ -120,6 +124,12 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/dingux-mips32.yml'
# tvOS (AppleTV)
- project: 'libretro-infrastructure/ci-templates'
file: '/tvos-arm64.yml'
#################################### MISC ##################################
# Stages for building
stages:
- build-prepare
@ -201,13 +211,29 @@ android-x86:
- .libretro-android-jni-x86
- .core-defs
# iOS 9
# iOS
libretro-build-ios-arm64:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9:
tags:
- macosx-packaging
extends:
- .libretro-ios9-make-default
- .core-defs
# tvOS
libretro-build-tvos-arm64:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
# Nintendo 3DS
@ -316,7 +342,15 @@ android-x86-x64sc:
- .libretro-android-jni-x86
- .core-defs-x64sc
# iOS 9
# iOS
libretro-build-ios-arm64-x64sc:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-x64sc
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-x64sc:
tags:
- macosx-packaging
@ -324,6 +358,14 @@ libretro-build-ios-9-x64sc:
- .libretro-ios9-make-default
- .core-defs-x64sc
# tvOS
libretro-build-tvos-arm64-x64sc:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-x64sc
################################### CONSOLES #################################
# Nintendo 3DS
libretro-build-ctr-x64sc:
@ -421,7 +463,15 @@ android-x86-x128:
- .libretro-android-jni-x86
- .core-defs-x128
# iOS 9
# iOS
libretro-build-ios-arm64-x128:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-x128
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-x128:
tags:
- macosx-packaging
@ -429,6 +479,14 @@ libretro-build-ios-9-x128:
- .libretro-ios9-make-default
- .core-defs-x128
# tvOS
libretro-build-tvos-arm64-x128:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-x128
# Static
libretro-build-libnx-aarch64-x128:
extends:
@ -521,7 +579,15 @@ android-x86-xcbm2:
- .libretro-android-jni-x86
- .core-defs-xcbm2
# iOS 9
# iOS
libretro-build-ios-arm64-xcbm2:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xcbm2
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xcbm2:
tags:
- macosx-packaging
@ -529,6 +595,14 @@ libretro-build-ios-9-xcbm2:
- .libretro-ios9-make-default
- .core-defs-xcbm2
# tvOS
libretro-build-tvos-arm64-xcbm2:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xcbm2
# Static
libretro-build-libnx-aarch64-xcbm2:
extends:
@ -629,6 +703,30 @@ libretro-build-ios-9-xcbm5x0:
- .libretro-ios9-make-default
- .core-defs-xcbm5x0
# iOS
libretro-build-ios-arm64-xcbm5x0:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xcbm5x0
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xcbm5x0:
tags:
- macosx-packaging
extends:
- .libretro-ios9-make-default
- .core-defs-xcbm5x0
# tvOS
libretro-build-tvos-arm64-xcbm5x0:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xcbm5x0
# Static
libretro-build-libnx-aarch64-xcbm5x0:
extends:
@ -721,7 +819,15 @@ android-x86-xpet:
- .libretro-android-jni-x86
- .core-defs-xpet
# iOS 9
# iOS
libretro-build-ios-arm64-xpet:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xpet
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xpet:
tags:
- macosx-packaging
@ -729,6 +835,14 @@ libretro-build-ios-9-xpet:
- .libretro-ios9-make-default
- .core-defs-xpet
# tvOS
libretro-build-tvos-arm64-xpet:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xpet
# Static
libretro-build-libnx-aarch64-xpet:
extends:
@ -821,7 +935,15 @@ android-x86-xplus4:
- .libretro-android-jni-x86
- .core-defs-xplus4
# iOS 9
# iOS
libretro-build-ios-arm64-xplus4:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xplus4
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xplus4:
tags:
- macosx-packaging
@ -829,6 +951,14 @@ libretro-build-ios-9-xplus4:
- .libretro-ios9-make-default
- .core-defs-xplus4
# tvOS
libretro-build-tvos-arm64-xplus4:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xplus4
# Static
libretro-build-libnx-aarch64-xplus4:
extends:
@ -929,6 +1059,30 @@ libretro-build-ios-9-xscpu64:
- .libretro-ios9-make-default
- .core-defs-xscpu64
# iOS
libretro-build-ios-arm64-xscpu64:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xscpu64
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xscpu64:
tags:
- macosx-packaging
extends:
- .libretro-ios9-make-default
- .core-defs-xscpu64
# tvOS
libretro-build-tvos-arm64-xscpu64:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xscpu64
# Static
libretro-build-libnx-aarch64-xscpu64:
extends:
@ -1021,7 +1175,15 @@ android-x86-xvic:
- .libretro-android-jni-x86
- .core-defs-xvic
# iOS 9
# iOS
libretro-build-ios-arm64-xvic:
tags:
- macosx-packaging
extends:
- .libretro-ios-arm64-make-default
- .core-defs-xvic
# iOS (armv7) [iOS 9 and up]
libretro-build-ios-9-xvic:
tags:
- macosx-packaging
@ -1029,6 +1191,14 @@ libretro-build-ios-9-xvic:
- .libretro-ios9-make-default
- .core-defs-xvic
# tvOS
libretro-build-tvos-arm64-xvic:
tags:
- macosx-packaging
extends:
- .libretro-tvos-arm64-make-default
- .core-defs-xvic
# Static
libretro-build-libnx-aarch64-xvic:
extends:

View File

@ -31,6 +31,13 @@ ifeq ($(shell uname -a),)
system_platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
arch = intel
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
ifeq ($(shell uname -p),arm)
arch = arm
endif
else ifneq ($(findstring MINGW,$(shell uname -a)),)
system_platform = win
endif
@ -134,16 +141,18 @@ else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
LDFLAGS += -dynamiclib
fpic = -fPIC
MINVERSION :=
ifeq ($(arch),ppc)
COMMONFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
endif
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
ifeq ($(OSX_LT_MAVERICKS),YES)
fpic += -mmacosx-version-min=10.1
MINVERSION = -mmacosx-version-min=10.1
else
fpic += -stdlib=libc++
endif
fpic += $(MINVERSION)
CFLAGS += -DHAVE_STRLCPY -DHAVE_VSNPRINTF -DHAVE_SNPRINTF -DHAVE_STPCPY -D_INTTYPES_H
CXXFLAGS += -DHAVE_STRLCPY -DHAVE_VSNPRINTF -DHAVE_SNPRINTF -DHAVE_STPCPY -D_INTTYPES_H
ifeq ($(CROSS_COMPILE),1)
@ -157,6 +166,7 @@ endif
else ifneq (,$(findstring ios,$(platform)))
TARGET := $(TARGET_NAME)_libretro_ios.dylib
COMMONFLAGS += -DHAVE_POSIX_MEMALIGN=1 -marm
MINVERSION :=
fpic = -fPIC
LDFLAGS += -dynamiclib
ifeq ($(IOSSDK),)
@ -175,9 +185,9 @@ else ifneq (,$(findstring ios,$(platform)))
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
ifeq ($(OSX_LT_MAVERICKS),"YES")
CC += -miphoneos-version-min=5.0
COMMONFLAGS += -miphoneos-version-min=5.0
MINVERSION = -miphoneos-version-min=5.0
endif
COMMONFLAGS += $(MINVERSION)
else ifeq ($(platform), tvos-arm64)
TARGET := $(TARGET_NAME)_libretro_tvos.dylib
@ -187,9 +197,11 @@ else ifeq ($(platform), tvos-arm64)
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk appletvos Path)
endif
COMMONFLAGS += -DIOS
CFLAGS += -DHAVE_STRLCPY -DHAVE_VSNPRINTF -DHAVE_SNPRINTF -DHAVE_STPCPY -D_INTTYPES_H
CXXFLAGS += -DHAVE_STRLCPY -DHAVE_VSNPRINTF -DHAVE_SNPRINTF -DHAVE_STPCPY -D_INTTYPES_H
COMMONFLAGS += -DIOS -DHAVE_STRLCPY -DHAVE_VSNPRINTF -DHAVE_SNPRINTF -DHAVE_STPCPY -D_INTTYPES_H
CFLAGS += $(COMMONFLAGS)
CXXFLAGS += $(COMMONFLAGS)
CC = clang -arch arm64 -isysroot $(IOSSDK)
CXX = clang++ -arch arm64 -isysroot $(IOSSDK)
else ifeq ($(platform), theos_ios)
DEPLOYMENT_IOSVERSION = 5.0