X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=60feab413346bcc196d1d62527fb1aac88a58480;hb=50388cd2d8ad759630c731fea23e002f38fd98f7;hp=64cff491f9396bf3aee8895a506b11ef8da561dc;hpb=6f1edc3c7fd1f7f58155107d0c99d0ac7d22443b;p=pcsx_rearmed.git diff --git a/Makefile.libretro b/Makefile.libretro index 64cff491..60feab41 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -48,6 +48,7 @@ EXTRA_LDFLAGS = ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC + THREAD_RENDERING = 1 ifneq ($(findstring SunOS,$(shell uname -s)),) CC = gcc endif @@ -58,6 +59,25 @@ ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_feature endif endif +# ODROIDN2 +else ifneq (,$(findstring CortexA73_G12B,$(platform))) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + SHARED := -shared -Wl,-version-script=link.T + ARCH = arm64 + CFLAGS += -fomit-frame-pointer -ffast-math -DARM + CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 + +# ALLWINNER H5 +else ifneq (,$(findstring h5,$(platform))) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + SHARED := -shared -Wl,-version-script=link.T + ARCH = arm64 + DYNAREC ?= lightrec + CFLAGS += -fomit-frame-pointer -ffast-math -DARM + CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mtune=cortex-a53 + else ifeq ($(platform), linux-portable) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC -nostdlib @@ -70,19 +90,17 @@ else ifeq ($(platform), linux-portable) # OS X else ifeq ($(platform), osx) + DYNAREC ?= lightrec TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC fpic += -mmacosx-version-min=10.1 -ifeq ($(DYNAREC),) - # Override - TARGET := $(TARGET_NAME)_interpreter_libretro.dylib -endif # iOS else ifeq ($(platform),$(filter $(platform),ios-arm64)) ARCH := arm64 HAVE_NEON = 0 BUILTIN_GPU = peops + DYNAREC = 0 TARGET := $(TARGET_NAME)_interpreter_libretro_ios.dylib CC = clang -arch arm64 -isysroot $(IOSSDK) -miphoneos-version-min=8.0 @@ -91,11 +109,15 @@ else ifeq ($(platform),$(filter $(platform),ios-arm64)) else ifneq (,$(findstring ios,$(platform))) ARCH := arm +# DYNAREC ?= ari64 HAVE_NEON = 1 BUILTIN_GPU = neon TARGET := $(TARGET_NAME)_libretro_ios.dylib -ifeq ($(DYNAREC),) +ifeq ($(DYNAREC),lightrec) # Override + DYNAREC := 0 +endif +ifeq ($(DYNAREC),0) TARGET := $(TARGET_NAME)_interpreter_libretro_ios.dylib endif fpic := -fPIC @@ -138,6 +160,8 @@ else ifeq ($(platform), libnx) CFLAGS += -Ifrontend/switch -ftree-vectorize LIBPTHREAD := STATIC_LINKING=1 + # Lightning requires rw/rx patches first + DYNAREC := 0 # Lakka Switch (arm64) else ifeq ($(platform), arm64) @@ -148,20 +172,6 @@ else ifeq ($(platform), arm64) CFLAGS := $(filter-out -O2, $(CFLAGS)) CFLAGS += -O3 -ftree-vectorize -# PS3 -else ifeq ($(platform), ps3) - TARGET := $(TARGET_NAME)_libretro_ps3.a - CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe - AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe - CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ - -# sncps3 -else ifeq ($(platform), sncps3) - TARGET := $(TARGET_NAME)_libretro_ps3.a - CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe - AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe - CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ - # Lightweight PS3 Homebrew SDK else ifeq ($(platform), psl1ght) TARGET := $(TARGET_NAME)_libretro_psl1ght.a @@ -194,6 +204,7 @@ else ifeq ($(platform), vita) HAVE_NEON = 1 BUILTIN_GPU = neon + DYNAREC = ari64 DRC_CACHE_BASE = 0 ARCH = arm @@ -205,15 +216,19 @@ else ifeq ($(platform), ctr) CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT) CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT) AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT) - CFLAGS += -DARM11 -D_3DS -DNO_OS -DNO_DYLIB -DNO_SOCKET + CFLAGS += -DARM11 -D_3DS -DNO_OS -DNO_DYLIB -DNO_SOCKET -DTHREAD_ENABLED -DGPU_UNAI_USE_FLOATMATH -DGPU_UNAI_USE_FLOAT_DIV_MULTINV CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft CFLAGS += -Wall -mword-relocations - CFLAGS += -fomit-frame-pointer -ffast-math - CFLAGS += -Ifrontend/3ds + CFLAGS += -fomit-frame-pointer -ffast-math -funroll-loops + CFLAGS += -Ifrontend/3ds -I$(CTRULIB)/include CFLAGS += -Werror=implicit-function-declaration + OBJS += frontend/3ds/utils.o + # CFLAGS += -DPCSX BUILTIN_GPU = unai + THREAD_RENDERING = 1 + DYNAREC = ari64 DRC_CACHE_BASE = 0 ARCH = arm HAVE_NEON = 0 @@ -247,6 +262,7 @@ else ifeq ($(platform), qnx) CC = qcc -Vgcc_ntoarmv7le CC_AS = $(CC) HAVE_NEON = 1 + DYNAREC = ari64 DRC_CACHE_BASE = 0 BUILTIN_GPU = neon ARCH = arm @@ -266,6 +282,7 @@ else ifeq ($(platform), rpi2) HAVE_NEON = 1 ARCH = arm BUILTIN_GPU = neon + DYNAREC = ari64 #Raspberry Pi 3 else ifeq ($(platform), rpi3) @@ -276,8 +293,9 @@ else ifeq ($(platform), rpi3) HAVE_NEON = 1 ARCH = arm BUILTIN_GPU = neon + DYNAREC = ari64 -#Raspberry Pi 4 +#Raspberry Pi 4 with a 32bit GNU/Linux OS else ifeq ($(platform), rpi4) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC @@ -286,6 +304,16 @@ else ifeq ($(platform), rpi4) HAVE_NEON = 1 ARCH = arm BUILTIN_GPU = neon + DYNAREC = ari64 + +#Raspberry Pi 4 with a 64bit GNU/Linux OS +else ifeq ($(platform), rpi4_64) + TARGET := $(TARGET_NAME)_libretro.so + ARCH := arm64 + BUILTIN_GPU = unai + DYNAREC = lightrec + fpic := -fPIC + CFLAGS += -march=armv8-a+crc+simd -mtune=cortex-a72 -ftree-vectorize # Classic Platforms #################### # Platform affix = classic__<µARCH> @@ -310,6 +338,7 @@ else ifeq ($(platform), classic_armv7_a7) HAVE_NEON = 1 ARCH = arm BUILTIN_GPU = neon + DYNAREC = ari64 ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1) CFLAGS += -march=armv7-a else @@ -331,6 +360,7 @@ else ifeq ($(platform), classic_armv8_a35) HAVE_NEON = 1 ARCH = arm BUILTIN_GPU = neon + DYNAREC = ari64 LDFLAGS += -static-libgcc -static-libstdc++ -fPIC ####################################### @@ -368,6 +398,15 @@ else ifneq (,$(findstring armv,$(platform))) ASFLAGS += -mfloat-abi=hard endif ARCH = arm + DYNAREC = ari64 + +# Emscripten +else ifeq ($(platform), emscripten) + TARGET := $(TARGET_NAME)_libretro_$(platform).bc + fpic := -fPIC + SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T + CFLAGS += -DNO_DYLIB -DNO_SOCKET + STATIC_LINKING = 1 # Windows else @@ -413,9 +452,9 @@ NO_CONFIG_MAK = yes # what does this do #libretro_all: all #ifeq ($(platform),ios) -#ifeq ($(USE_DYNAREC),1) -# make -f Makefile.libretro USE_DYNAREC=0 platform=$(platform) clean -# make -f Makefile.libretro USE_DYNAREC=0 platform=$(platform) +#ifeq ($(DYNAREC),1) +# make -f Makefile.libretro DYNAREC=0 platform=$(platform) clean +# make -f Makefile.libretro DYNAREC=0 platform=$(platform) #endif #endif