Commit e6652be4 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

(macOS) Add macOS builds

parent dd65741e
......@@ -30,6 +30,14 @@ include:
- project: 'libretro-infrastructure/ci-templates'
file: '/linux-i686.yml'
# MacOS ARM 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-arm64.yml'
# MacOS 64-bit
- project: 'libretro-infrastructure/ci-templates'
file: '/osx-x64.yml'
################################## CELLULAR ################################
# Android
- project: 'libretro-infrastructure/ci-templates'
......@@ -87,6 +95,18 @@ libretro-build-linux-i686:
- .libretro-linux-i686-make-default
- .core-defs
# macOS 64-bit
libretro-build-osx-arm64:
extends:
- .libretro-osx-arm64-make-default
- .core-defs
# macOS 64-bit
libretro-build-osx-x64:
extends:
- .libretro-osx-x64-make-default
- .core-defs
################################### CELLULAR #################################
# Android ARMv7a
android-armeabi-v7a:
......
......@@ -29,6 +29,9 @@ ifeq ($(shell uname -a),)
else ifneq ($(findstring Darwin,$(shell uname -a)),)
system_platform = osx
arch = intel
ifeq ($(shell uname -p),arm)
arch = arm
endif
ifeq ($(shell uname -p),powerpc)
arch = ppc
endif
......@@ -44,13 +47,6 @@ endif
LIBM := -lm
STATIC_LINKING := 0
ifeq ($(ARCHFLAGS),)
ifeq ($(archs),ppc)
ARCHFLAGS = -arch ppc -arch ppc64
else
ARCHFLAGS = -arch i386 -arch x86_64
endif
endif
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
......@@ -77,8 +73,33 @@ else ifeq ($(platform), osx)
SHARED := -dynamiclib
LUA_SYSCFLAGS := -DLUA_USE_MACOSX
CFLAGS += -DHAVE_STRL
WANT_PHYSFS=0
WANT_PHYSFS=0
MMD :=
ifeq ($(UNIVERSAL),1)
ifeq ($(ARCHFLAGS),)
ARCHFLAGS = -arch i386 -arch x86_64
endif
ifeq ($(archs),arm)
ARCHFLAGS = -arch arm64
endif
ifeq ($(archs),ppc)
ARCHFLAGS = -arch ppc -arch ppc64
endif
endif
ifeq ($(CROSS_COMPILE),1)
TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT)
CFLAGS += $(TARGET_RULE)
CPPFLAGS += $(TARGET_RULE)
CXXFLAGS += $(TARGET_RULE)
LDFLAGS += $(TARGET_RULE)
endif
CFLAGS += $(ARCHFLAGS)
CXXFLAGS += $(ARCHFLAGS)
LDFLAGS += $(ARCHFLAGS)
# iOS
else ifneq (,$(findstring ios,$(platform)))
......@@ -86,19 +107,27 @@ else ifneq (,$(findstring ios,$(platform)))
fpic := -fPIC
SHARED := -dynamiclib
DEFINES := -DIOS
CC = cc -arch armv7 -isysroot $(IOSSDK)
CFLAGS += -DHAVE_STRL
ifeq ($(IOSSDK),)
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
endif
IPHONEMINVER :=
ifeq ($(platform),ios9)
IPHONEMINVER = -miphoneos-version-min=8.0
IPHONEMINVER = -miphoneos-version-min=8.0
else
IPHONEMINVER = -miphoneos-version-min=6.0
IPHONEMINVER = -miphoneos-version-min=6.0
endif
LDFLAGS += $(IPHONEMINVER)
FLAGS += $(IPHONEMINVER)
CC += $(IPHONEMINVER)
CXX += $(IPHONEMINVER)
WANT_PHYSFS=0
CCFLAGS += $(IPHONEMINVER)
CXXFLAGS += $(IPHONEMINVER)
WANT_PHYSFS=0
else ifeq ($(platform), qnx)
TARGET := $(TARGET_NAME)_libretro_$(platform).so
fpic := -fPIC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment