fix some issues and warnings seen on ctr build
[pcsx_rearmed.git] / Makefile.libretro
index ac91cf8..59bc575 100644 (file)
@@ -3,6 +3,7 @@
 DEBUG ?= 0
 WANT_ZLIB ?= 1
 HAVE_CHD ?= 1
+USE_LIBRETRO_VFS ?= 0
 
 # Dynarec options: lightrec, ari64
 DYNAREC ?= lightrec
@@ -74,7 +75,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
 
@@ -252,6 +253,7 @@ else ifeq ($(platform), ctr)
        CFLAGS += -fomit-frame-pointer -ffast-math -funroll-loops
        CFLAGS += -Ifrontend/3ds -I$(CTRULIB)/include
        CFLAGS += -Werror=implicit-function-declaration
+       CFLAGS += -DHAVE_UNISTD_H
 
        OBJS += frontend/3ds/utils.o
 
@@ -303,6 +305,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
@@ -325,6 +338,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
@@ -341,7 +363,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
 
@@ -450,6 +472,7 @@ else
        LIBPTHREAD :=
        LIBDL :=
        LIBM :=
+       USE_LIBRETRO_VFS = 1
 endif
 
 CFLAGS += $(fpic)