libretro: fix a typo
[pcsx_rearmed.git] / Makefile.libretro
index 72ce07b..3a54bdf 100644 (file)
@@ -203,6 +203,18 @@ else ifeq ($(platform), rpi2)
        ARCH = arm
        BUILTIN_GPU = neon
        USE_DYNAREC = 1
+       
+#Raspberry Pi 3
+else ifeq ($(platform), rpi3)
+       TARGET := $(TARGET_NAME)_libretro.so
+       fpic := -fPIC
+       SHARED := -shared -Wl,--no-undefined
+       CFLAGS += -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+       ASFLAGS += -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+       HAVE_NEON = 1
+       ARCH = arm
+       BUILTIN_GPU = neon
+       USE_DYNAREC = 1
 
 # ARM
 else ifneq (,$(findstring armv,$(platform)))
@@ -249,12 +261,23 @@ CFLAGS += $(fpic)
 ifeq ($(platform),win)
        MAIN_LDLIBS += -lws2_32
 else ifneq ($(platform),qnx)
-       LDLIBS += $(LIBPHTREAD)
+       LDLIBS += $(LIBPTHREAD)
        MAIN_LDLIBS += $(LIBDL)
 endif
 MAIN_LDFLAGS += -shared
 MAIN_LDLIBS += $(LIBM) $(LIBZ)
 
+# try to autodetect stuff for the lazy
+ifndef ARCH
+ARCH = $(shell $(CC) -dumpmachine | awk -F- '{print $$1}')
+endif
+ifndef HAVE_NEON
+HAVE_NEON = $(shell $(CC) -E -dD - < /dev/null 2> /dev/null | grep -q __ARM_NEON__ && echo 1 || echo 0)
+endif
+ifeq ($(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU)
+MAIN_LDFLAGS += -Wl,--no-undefined
+endif
+
 TARGET ?= libretro.so
 PLATFORM = libretro
 BUILTIN_GPU ?= peops