X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=22fa7e80a99e994892d68a1ecff2eb83aa53969c;hb=12367ad02622ba0e6457a7bea7b859bcf85ecb46;hp=5a59aeaff5a311cbd3ba0f65a6204cb7dbc4f9a7;hpb=e1d8eb0f131f9e7e838ec5658345e51ebcc3179c;p=pcsx_rearmed.git diff --git a/Makefile.libretro b/Makefile.libretro index 5a59aeaf..22fa7e80 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -2,6 +2,7 @@ DEBUG ?= 0 WANT_ZLIB ?= 1 +HAVE_CHD ?= 1 ifeq ($(platform),) platform = unix @@ -47,6 +48,12 @@ ifeq ($(platform), unix) ifneq ($(findstring SunOS,$(shell uname -s)),) CC = gcc endif +ifeq ($(ARCH), arm) +ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h)),) + # must disable thumb as recompiler can't handle it + CFLAGS += -marm +endif +endif else ifeq ($(platform), linux-portable) TARGET := $(TARGET_NAME)_libretro.so @@ -75,7 +82,11 @@ else ifeq ($(platform),$(filter $(platform),ios-arm64)) USE_DYNAREC = 0 HAVE_NEON = 0 BUILTIN_GPU = peops - TARGET := $(TARGET_NAME)_libretro_ios.dylib + TARGET := $(TARGET_NAME)_interpreter_libretro_ios.dylib + + CC = clang -arch arm64 -isysroot $(IOSSDK) -miphoneos-version-min=8.0 + CXX = clang++ -arch arm64 -isysroot $(IOSSDK) -miphoneos-version-min=8.0 + CFLAGS += -marm -DIOS else ifneq (,$(findstring ios,$(platform))) ARCH := arm @@ -111,6 +122,34 @@ else CFLAGS += -miphoneos-version-min=5.0 endif +# Nintendo Switch (libnx) +else ifeq ($(platform), libnx) + export DEPSDIR := $(CURDIR)/ + include $(DEVKITPRO)/libnx/switch_rules + TARGET := $(TARGET_NAME)_libretro_$(platform).a + ARCH := arm64 + BUILTIN_GPU = unai + HAVE_VFS_FD = 0 + CFLAGS += -O3 -fomit-frame-pointer -ffast-math -I$(DEVKITPRO)/libnx/include/ -fPIE -Wl,--allow-multiple-definition -include $(LIBNX)/include/switch.h + CFLAGS += -specs=$(DEVKITPRO)/libnx/switch.specs -DNO_OS -DNO_DYLIB -DNO_SOCKET -D__arm64__ -D__ARM_NEON__ + CFLAGS += -D__SWITCH__ + CFLAGS += -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -DHAVE_INTTYPES -DLSB_FIRST -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections + CFLAGS += -ftree-vectorize + CFLAGS += -Ifrontend/switch -ftree-vectorize + LIBPTHREAD := + USE_DYNAREC = 0 + STATIC_LINKING=1 + +# Lakka Switch (arm64) +else ifeq ($(platform), arm64) + TARGET := $(TARGET_NAME)_libretro.so + ARCH := arm64 + BUILTIN_GPU = unai + fpic := -fPIC + CFLAGS := $(filter-out -O2, $(CFLAGS)) + CFLAGS += -O3 -ftree-vectorize + USE_DYNAREC = 0 + # PS3 else ifeq ($(platform), ps3) TARGET := $(TARGET_NAME)_libretro_ps3.a @@ -177,12 +216,11 @@ else ifeq ($(platform), ctr) CFLAGS += -Werror=implicit-function-declaration # CFLAGS += -DPCSX -# BUILTIN_GPU = unai + BUILTIN_GPU = unai USE_DYNAREC = 1 DRC_CACHE_BASE = 0 ARCH = arm HAVE_NEON = 0 - STATIC_LINKING = 1 # Xbox 360 @@ -246,6 +284,17 @@ else ifeq ($(platform), rpi3) BUILTIN_GPU = neon USE_DYNAREC = 1 +#Raspberry Pi 4 +else ifeq ($(platform), rpi4) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + CFLAGS += -marm -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard + ASFLAGS += -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard + HAVE_NEON = 1 + ARCH = arm + BUILTIN_GPU = neon + USE_DYNAREC = 1 + # Classic Platforms #################### # Platform affix = classic__<µARCH> # Help at https://modmyclassic.com/comp @@ -279,6 +328,21 @@ else ifeq ($(platform), classic_armv7_a7) LDFLAGS += -static-libgcc -static-libstdc++ endif endif + +# (armv8 a35, hard point, neon based) ### +# PlayStation Classic +else ifeq ($(platform), classic_armv8_a35) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + CFLAGS += -Ofast \ + -fmerge-all-constants -fno-math-errno -march=armv8-a \ + -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard + HAVE_NEON = 1 + ARCH = arm + BUILTIN_GPU = neon + USE_DYNAREC = 1 + LDFLAGS += -static-libgcc -static-libstdc++ -fPIC + ####################################### # ARM