X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=7b9618e1ccfc63982be50b82fda498d75e307fdc;hb=0cf4107147cfd3675c8ce3bac4403f9c507a3390;hp=41cb5050fffbb2fe488b6a4a959326748e9879ae;hpb=b5bb0aea098228745c26d660855d5fada85d836f;p=pcsx_rearmed.git diff --git a/Makefile.libretro b/Makefile.libretro index 41cb5050..7b9618e1 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -46,6 +46,20 @@ LIBM := -lm MMAP_WIN32 = 0 EXTRA_LDFLAGS = +# select some defaults +ifneq (,$(findstring $(ARCH_DETECTED),arm aarch64)) + DYNAREC = ari64 +ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h)),) + # must disable thumb as ari64 can't handle it + CFLAGS += -marm +endif +endif +ifneq (,$(findstring $(ARCH_DETECTED),i686 x86_64 aarch64)) + BUILTIN_GPU = neon +endif + +# platform specific options + # Unix ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.so @@ -57,14 +71,6 @@ endif ifneq ($(findstring SunOS,$(shell uname -s)),) CC = gcc endif -ifneq (,$(findstring $(ARCH_DETECTED),arm aarch64)) - DYNAREC = ari64 - -ifneq ($(findstring __thumb__,$(shell $(CC) -E -dD $(CFLAGS) include/arm_features.h)),) - # must disable thumb as ari64 can't handle it - CFLAGS += -marm -endif -endif # ODROIDN2 else ifneq (,$(findstring CortexA73_G12B,$(platform))) @@ -145,8 +151,8 @@ ifeq ($(platform),ios-arm64) CC = cc -arch arm64 -isysroot $(IOSSDK) CXX = c++ -arch arm64 -isysroot $(IOSSDK) ARCH := arm64 - HAVE_NEON = 0 - BUILTIN_GPU = peops + BUILTIN_GPU = neon + HAVE_NEON = 1 DYNAREC = 0 else CC = cc -arch armv7 -isysroot $(IOSSDK) @@ -179,12 +185,12 @@ endif IOSSDK := $(shell xcodebuild -version -sdk appletvos Path) endif - CFLAGS += -DIOS -DTVOS -marm + CFLAGS += -DIOS -DTVOS CC = cc -arch arm64 -isysroot $(IOSSDK) CXX = c++ -arch arm64 -isysroot $(IOSSDK) ARCH := arm64 - HAVE_NEON = 0 - BUILTIN_GPU = peops + BUILTIN_GPU = neon + HAVE_NEON = 1 DYNAREC = 0 CC_AS = perl ./tools/gas-preprocessor.pl $(CC) @@ -495,7 +501,6 @@ else ifeq ($(platform), emscripten) # Windows else TARGET := $(TARGET_NAME)_libretro.dll - BUILTIN_GPU = peops PLATFORM = libretro MAIN_LDFLAGS += -static-libgcc -static-libstdc++ -s CFLAGS += -D__WIN32__ -DNO_DYLIB @@ -529,6 +534,15 @@ endif ifdef ALLOW_LIGHTREC_ON_ARM CFLAGS += -DALLOW_LIGHTREC_ON_ARM endif +ifeq ($(BUILTIN_GPU),neon) +ifneq (,$(findstring $(ARCH),x86 i686)) + CFLAGS_GPU_NEON ?= -msse2 # required +endif +ifeq ($(ARCH),x86_64) + CFLAGS_GPU_NEON ?= -mssse3 # optional, for more perf +endif +CFLAGS += $(CFLAGS_GPU_NEON) +endif TARGET ?= libretro.so PLATFORM = libretro @@ -546,6 +560,16 @@ NO_CONFIG_MAK = yes #endif #endif +$(info TARGET: $(TARGET)) +$(info platform: $(platform)) +$(info ARCH: $(ARCH)) +$(info DYNAREC: $(DYNAREC)) +$(info BUILTIN_GPU: $(BUILTIN_GPU)) +$(info CC: $(CC)) +$(info CFLAGS: $(CFLAGS)) +$(info MAIN_LDLIBS: $(MAIN_LDLIBS)) +$(info ) + include Makefile # no special AS needed for gpu_neon