drc: prevent people from using lightrec on arm
[pcsx_rearmed.git] / Makefile.libretro
index bd74dec..066da82 100644 (file)
@@ -3,6 +3,7 @@
 DEBUG ?= 0
 WANT_ZLIB ?= 1
 HAVE_CHD ?= 1
+USE_LIBRETRO_VFS ?= 0
 
 # Dynarec options: lightrec, ari64
 DYNAREC ?= lightrec
@@ -65,6 +66,7 @@ else ifneq (,$(findstring CortexA73_G12B,$(platform)))
        fpic := -fPIC
        SHARED := -shared -Wl,-version-script=link.T
        ARCH = arm64
+       DYNAREC ?= ari64
        CFLAGS += -fomit-frame-pointer -ffast-math -DARM
        CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53
 
@@ -74,7 +76,7 @@ else ifneq (,$(findstring h5,$(platform)))
        fpic := -fPIC
        SHARED := -shared -Wl,-version-script=link.T
        ARCH = arm64
-       DYNAREC ?= lightrec
+       DYNAREC ?= ari64
        CFLAGS += -fomit-frame-pointer -ffast-math -DARM
        CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mtune=cortex-a53
 
@@ -197,6 +199,7 @@ else ifeq ($(platform), libnx)
 else ifeq ($(platform), arm64)
    TARGET := $(TARGET_NAME)_libretro.so
    ARCH := arm64
+   DYNAREC = ari64
    BUILTIN_GPU = unai
    fpic := -fPIC
    CFLAGS := $(filter-out -O2, $(CFLAGS))
@@ -235,8 +238,6 @@ else ifeq ($(platform), vita)
        BUILTIN_GPU = neon
 
        DYNAREC = ari64
-       DRC_CACHE_BASE = 0
-
        ARCH = arm
        STATIC_LINKING = 1
 
@@ -260,7 +261,6 @@ else ifeq ($(platform), ctr)
        BUILTIN_GPU = unai
        THREAD_RENDERING = 1
        DYNAREC = ari64
-       DRC_CACHE_BASE = 0
        ARCH = arm
        HAVE_NEON = 0
        STATIC_LINKING = 1
@@ -294,7 +294,6 @@ else ifeq ($(platform), qnx)
        CC_AS = $(CC)
        HAVE_NEON = 1
        DYNAREC = ari64
-       DRC_CACHE_BASE = 0
        BUILTIN_GPU = neon
        ARCH = arm
        CFLAGS += -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp
@@ -304,6 +303,17 @@ else ifeq ($(platform), qnx)
        LIBDL :=
        LIBM :=
 
+#Raspberry Pi 1
+else ifeq ($(platform), rpi1)
+       TARGET := $(TARGET_NAME)_libretro.so
+       fpic := -fPIC
+       CFLAGS += -marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard
+       ASFLAGS += -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard
+       HAVE_NEON = 0
+       ARCH = arm
+       BUILTIN_GPU = unai
+       DYNAREC = ari64
+
 #Raspberry Pi 2
 else ifeq ($(platform), rpi2)
        TARGET := $(TARGET_NAME)_libretro.so
@@ -326,6 +336,15 @@ else ifeq ($(platform), rpi3)
        BUILTIN_GPU = neon
        DYNAREC = ari64
 
+#Raspberry Pi 3 with a 64bit GNU/Linux OS
+else ifeq ($(platform), rpi3_64)
+       TARGET := $(TARGET_NAME)_libretro.so
+       ARCH := arm64
+       BUILTIN_GPU = unai
+       DYNAREC = ari64
+       fpic := -fPIC
+       CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a53 -ftree-vectorize
+
 #Raspberry Pi 4 with a 32bit GNU/Linux OS
 else ifeq ($(platform), rpi4)
        TARGET := $(TARGET_NAME)_libretro.so
@@ -342,7 +361,7 @@ else ifeq ($(platform), rpi4_64)
         TARGET := $(TARGET_NAME)_libretro.so
         ARCH := arm64
         BUILTIN_GPU = unai
-        DYNAREC = lightrec
+       DYNAREC = ari64
         fpic := -fPIC
         CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize
 
@@ -401,7 +420,6 @@ else ifneq (,$(findstring armv,$(platform)))
        TARGET := $(TARGET_NAME)_libretro.so
        fpic := -fPIC
        HAVE_NEON = 0
-       DRC_CACHE_BASE = 0
        BUILTIN_GPU = peops
        ifneq (,$(findstring cortexa8,$(platform)))
                CFLAGS += -marm -mcpu=cortex-a8
@@ -431,6 +449,18 @@ else ifneq (,$(findstring armv,$(platform)))
        ARCH = arm
        DYNAREC = ari64
 
+else ifeq ($(platform), miyoo)
+       TARGET := $(TARGET_NAME)_libretro.so
+       CC = /opt/miyoo/usr/bin/arm-linux-gcc
+       CXX = /opt/miyoo/usr/bin/arm-linux-g++
+       fpic := -fPIC
+       CFLAGS += -mcpu=arm926ej-s -fsingle-precision-constant
+       CFLAGS += -DGPULIB_USE_MMAP -DGPU_UNAI_USE_INT_DIV_MULTINV -D_MIYOO
+       ARCH = arm
+       BUILTIN_GPU = unai
+       DYNAREC = ari64
+       HAVE_NEON = 0
+
 # Emscripten
 else ifeq ($(platform), emscripten)
    TARGET  := $(TARGET_NAME)_libretro_$(platform).bc
@@ -451,6 +481,7 @@ else
        LIBPTHREAD :=
        LIBDL :=
        LIBM :=
+       USE_LIBRETRO_VFS = 1
 endif
 
 CFLAGS += $(fpic)
@@ -472,6 +503,9 @@ endif
 ifeq ($(NO_UNDEF_CHECK)$(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU)
 MAIN_LDFLAGS += -Wl,--no-undefined
 endif
+ifdef ALLOW_LIGHTREC_ON_ARM
+CFLAGS += -DALLOW_LIGHTREC_ON_ARM
+endif
 
 TARGET ?= libretro.so
 PLATFORM = libretro