X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=26ee336c3eec22d81740880a3fa5890b06a899f4;hb=4e0771f57fdc6d3410a11c7731d9e8dbc3c026f6;hp=2b2a362dab50026ed02e7e054d6d6b44df2f379f;hpb=5c166f3762810e337ee65c411fcd5f787097ff1e;p=pcsx_rearmed.git diff --git a/Makefile.libretro b/Makefile.libretro index 2b2a362d..26ee336c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -142,20 +142,17 @@ 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 - CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp + CFLAGS += -DARM11 -D_3DS -DNO_OS -DNO_DYLIB -DNO_SOCKET + CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft CFLAGS += -Wall -mword-relocations CFLAGS += -fomit-frame-pointer -ffast-math - CFLAGS += -I$(CTRULIB)/include -I$(DEVKITPRO)/portlibs/armv6k/include -Ifrontend/3ds + CFLAGS += -Ifrontend/3ds CFLAGS += -Werror=implicit-function-declaration - OBJS += frontend/3ds/3ds_utils.o - - # CFLAGS += -DPCSX # BUILTIN_GPU = unai USE_DYNAREC = 1 - DRC_CACHE_BASE = 0 + DRC_CACHE_BASE = 1 ARCH = arm STATIC_LINKING = 1 @@ -184,7 +181,7 @@ else ifeq ($(platform), wii) # QNX else ifeq ($(platform), qnx) TARGET := $(TARGET_NAME)_libretro_qnx.so - fpic := -fPIC + fpic := -fPIC CC = qcc -Vgcc_ntoarmv7le CC_AS = $(CC) HAVE_NEON = 1 @@ -195,11 +192,35 @@ else ifeq ($(platform), qnx) CFLAGS += -DBASE_ADDR_FIXED=0 -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp ASFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp +#Raspberry Pi 2 +else ifeq ($(platform), rpi2) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + SHARED := -shared -Wl,--no-undefined + CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard + ASFLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard + HAVE_NEON = 1 + 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))) TARGET := $(TARGET_NAME)_libretro.so SHARED := -shared -Wl,--no-undefined - fpic := -fPIC + fpic := -fPIC DRC_CACHE_BASE = 0 ifneq (,$(findstring cortexa8,$(platform))) CFLAGS += -marm -mcpu=cortex-a8 @@ -223,7 +244,7 @@ else ifneq (,$(findstring armv,$(platform))) ASFLAGS += -mfloat-abi=hard endif ARCH = arm - USE_DYNAREC = 1 + USE_DYNAREC = 1 # Windows else @@ -246,6 +267,17 @@ 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