Skip to content

Commit

Permalink
Add ios-arm64 build target; Added forward declarations for a couple c…
Browse files Browse the repository at this point in the history
…ompression related methods needed to fix compile issues; fixing zlib header for ios-arm64
  • Loading branch information
yoshisuga committed Jul 24, 2017
1 parent ae9dda6 commit aa6954e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ else ifneq (,$(findstring ios,$(platform)))
IOSSDK := $(shell xcodebuild -version -sdk iphoneos Path)
endif

ifeq ($(platform),ios-arm64)
CC = cc -arch arm64 -isysroot $(IOSSDK)
CXX = c++ -arch arm64 -isysroot $(IOSSDK)
else
CC = cc -arch armv7 -isysroot $(IOSSDK)
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
CXX = c++ -arch armv7 -isysroot $(IOSSDK)
ifeq ($(platform),ios9)
endif
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)

ifeq ($(platform),$(filter $(platform),ios9 ios-arm64))
CC += -miphoneos-version-min=8.0
CXX += -miphoneos-version-min=8.0
CC_AS += -miphoneos-version-min=8.0
Expand All @@ -164,6 +170,10 @@ else
PLATFORM_DEFINES := -miphoneos-version-min=5.0
endif

ifeq ($(platform),ios-arm64)
PLATFORM_DEFINES += -D_IOS_ARM64
endif

# Theos
else ifeq ($(platform), theos_ios)
DEPLOYMENT_IOSVERSION = 5.0
Expand Down
8 changes: 8 additions & 0 deletions libspectrum/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ libspectrum_error
libspectrum_bzip2_inflate( const libspectrum_byte *bzptr, size_t bzlength,
libspectrum_byte **outptr, size_t *outlength );

libspectrum_error
libspectrum_zlib_inflate( const libspectrum_byte *gzptr, size_t gzlength,
libspectrum_byte **outptr, size_t *outlength );

libspectrum_error
libspectrum_zlib_compress( const libspectrum_byte *data, size_t length,
libspectrum_byte **gzptr, size_t *gzlength );

/* The TZX file signature */

extern const char *libspectrum_tzx_signature;
Expand Down
4 changes: 4 additions & 0 deletions zlib/gzguts.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
# define ZLIB_INTERNAL
#endif

#ifdef _IOS_ARM64
#include <unistd.h>
#endif

#include <stdio.h>
#include "zlib.h"
#ifdef STDC
Expand Down

0 comments on commit aa6954e

Please sign in to comment.