mirror of
https://github.com/libretro/snes9x2005.git
synced 2024-11-23 16:29:43 +00:00
(macOS) Set up CROSS_COMPILING for ARM 64bit
This commit is contained in:
parent
77783aaeca
commit
18307e0c4a
14
Makefile
14
Makefile
@ -23,6 +23,9 @@ ifeq ($(platform),)
|
|||||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||||
platform = osx
|
platform = osx
|
||||||
arch = intel
|
arch = intel
|
||||||
|
ifeq ($(shell uname -p),arm64)
|
||||||
|
arch = arm
|
||||||
|
endif
|
||||||
ifeq ($(shell uname -p),powerpc)
|
ifeq ($(shell uname -p),powerpc)
|
||||||
arch = ppc
|
arch = ppc
|
||||||
endif
|
endif
|
||||||
@ -112,11 +115,18 @@ ifeq ($(arch),ppc)
|
|||||||
OLD_GCC = 1
|
OLD_GCC = 1
|
||||||
endif
|
endif
|
||||||
OSXVER = $(shell sw_vers -productVersion | cut -d. -f 2)
|
OSXVER = $(shell sw_vers -productVersion | cut -d. -f 2)
|
||||||
OSX_GT_MOJAVE = $(shell (( $(OSXVER) >= 14)) && echo "YES")
|
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
|
||||||
ifneq ($(OSX_GT_MOJAVE),YES)
|
ifeq ($(OSX_LT_MAVERICKS),YES)
|
||||||
#this breaks compiling on Mac OS Mojave
|
#this breaks compiling on Mac OS Mojave
|
||||||
fpic += -mmacosx-version-min=10.1
|
fpic += -mmacosx-version-min=10.1
|
||||||
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
|
||||||
ifndef ($(NOUNIVERSAL))
|
ifndef ($(NOUNIVERSAL))
|
||||||
FLAGS += $(ARCHFLAGS)
|
FLAGS += $(ARCHFLAGS)
|
||||||
LDFLAGS += $(ARCHFLAGS)
|
LDFLAGS += $(ARCHFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user