Fixed cflags for PSC build (#281)
[pcsx_rearmed.git] / Makefile.libretro
index e4a102a..5d380b6 100644 (file)
@@ -47,6 +47,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
@@ -279,6 +285,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
@@ -334,6 +355,11 @@ CFLAGS += $(fpic)
 MAIN_LDFLAGS += -shared
 MAIN_LDLIBS += $(LIBPTHREAD) $(LIBM) $(LIBDL) $(LIBZ)
 
+# enable large file support if available
+ifeq ($(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h | grep __SIZEOF_LONG__ | awk '{print $$3}'),4)
+CFLAGS += -D_FILE_OFFSET_BITS=64
+endif
+
 # try to autodetect stuff for the lazy
 ifndef ARCH
 ARCH = $(shell $(CC) -dumpmachine | awk -F- '{print $$1}')