Unverified Commit d4199898 authored by Rob Loach's avatar Rob Loach
Browse files

Update for iOS

parent c7f2fb3a
......@@ -4,6 +4,11 @@ All notable changes to [ChaiLove](https://github.com/RobLoach/ChaiLove) will be
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 1.1.x - xxxx-xx-xx
### Fixes
- iOS compilation
## 1.0.0 - 2019-08-23
### Chores
- Updated dependencies
......
......@@ -32,12 +32,6 @@ $(TARGET): $(OBJECTS) | vendor/libretro-common/include/libretro.h
clean:
rm -f $(TARGET) $(OBJECTS)
git clean -xdf
rm -rf vendor
git reset --hard HEAD
git submodule update -f --init --recursive
git submodule foreach --recursive git clean -xfd
git submodule foreach --recursive git reset --hard HEAD
vendor/libretro-common/include/libretro.h:
@git submodule update --init --recursive
......
......@@ -102,14 +102,15 @@ else ifneq (,$(findstring ios,$(platform)))
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif
ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
CC = cc -DDONT_WANT_ARM_OPTIMIZATIONS -arch arm64 -isysroot -DHAVE_POSIX_MEMALIGN $(IOSSDK)
HAVE_NEON = 0
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
CC = cc -arch armv7 -isysroot $(IOSSDK)
endif
CFLAGS += -DIOS
ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
CC += -miphoneos-version-min=8.0
CFLAGS += -miphoneos-version-min=8.0
CC += -miphoneos-version-min=8.0 -DHAVE_POSIX_MEMALIGN
CFLAGS += -miphoneos-version-min=8.0 -DHAVE_POSIX_MEMALIGN
else
CC += -miphoneos-version-min=5.0
CFLAGS += -miphoneos-version-min=5.0
......@@ -299,8 +300,8 @@ else ifeq ($(platform), libnx)
# Platform affix = classic_<ISA>_<µARCH>
# Help at https://modmyclassic.com/comp
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
else ifeq ($(platform), classic_armv7_a7)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
......@@ -611,6 +612,14 @@ else
endif
endif
ifeq ($(platform), ios-arm64)
LDFLAGS += -framework IOKit -framework Foundation
FLAGS += -D__MACH__ -D__APPLE__ -DPHYSFS_PLATFORM_APPLE
FLAGS += -DWANT_NEON=0 -D__ARM_NEON__=0
FLAGS += -DCHAILOVE_DISABLE_LOVE_SYSTEM_EXECUTE
SOURCES_M += $(CORE_DIR)/vendor/didstopia-physfs/src/physfs_platform_apple.m
endif
ifeq ($(EXTERNAL_ZLIB), 1)
CFLAGS += -DHAVE_EXTERNAL_ZLIB
endif
......
......@@ -106,6 +106,10 @@ std::string system::getUsername() {
}
bool system::execute(const std::string& command) {
#ifndef CHAILOVE_DISABLE_LOVE_SYSTEM_EXECUTE
std::cout << "[ChaiLove] [system] love.system.execute() is disabled." << std::endl;
return false;
#else
std::cout << "[ChaiLove] [system] love.system.execute(\"" << command << "\")" << std::endl;
int result = std::system(command.c_str());
if (result != 0) {
......@@ -114,6 +118,7 @@ bool system::execute(const std::string& command) {
}
std::cout << "[ChaiLove] [system] Finished " << command << std::endl;
return true;
#endif
}
std::string system::getClipboardText() {
......
Subproject commit f88c23f5c64bed490b3e61d582f4c20cf3925ed1
Subproject commit d37a230af4bf7ed933657766b3e8482e44a613b7
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