X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile.libretro;h=e4a102a613cd8a5f8e7f97bc5f5d4e7352475de4;hb=a9422018bae26b5f1dd65a25d1adef80b0bec99d;hp=a8c8c4a23ce68cc6077b89f34eb95f9d59669ebf;hpb=3733c6fefd2bcc15a637139c036518762aa5956b;p=pcsx_rearmed.git diff --git a/Makefile.libretro b/Makefile.libretro index a8c8c4a2..e4a102a6 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -1,7 +1,7 @@ # Makefile for PCSX ReARMed (libretro) -DEBUG=0 -WANT_ZLIB=1 +DEBUG ?= 0 +WANT_ZLIB ?= 1 ifeq ($(platform),) platform = unix @@ -36,7 +36,8 @@ LIBDL := -lroot -lnetwork else LIBDL := -ldl endif -MMAP_WIN32=0 +LIBM := -lm +MMAP_WIN32 = 0 EXTRA_LDFLAGS = # Unix @@ -54,29 +55,35 @@ else ifeq ($(platform), linux-portable) LIBZ := LIBPTHREAD := LIBDL := + LIBM := NO_UNDEF_CHECK = 1 # OS X else ifeq ($(platform), osx) + USE_DYNAREC ?= 1 TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC fpic += -mmacosx-version-min=10.1 +ifeq ($(USE_DYNAREC),0) + # Override + TARGET := $(TARGET_NAME)_interpreter_libretro.dylib +endif # iOS else ifeq ($(platform),$(filter $(platform),ios-arm64)) - ARCH := arm64 - USE_DYNAREC = 0 - HAVE_NEON = 0 - BUILTIN_GPU = peops - TARGET := $(TARGET_NAME)_libretro_ios.dylib + ARCH := arm64 + USE_DYNAREC = 0 + HAVE_NEON = 0 + BUILTIN_GPU = peops + TARGET := $(TARGET_NAME)_libretro_ios.dylib else ifneq (,$(findstring ios,$(platform))) ARCH := arm USE_DYNAREC ?= 1 - HAVE_NEON = 1 - BUILTIN_GPU = neon + HAVE_NEON = 1 + BUILTIN_GPU = neon TARGET := $(TARGET_NAME)_libretro_ios.dylib -ifeq ($(USE_DYNAREC),1) +ifeq ($(USE_DYNAREC),0) # Override TARGET := $(TARGET_NAME)_interpreter_libretro_ios.dylib endif @@ -141,7 +148,7 @@ else ifeq ($(platform), vita) CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm CFLAGS += -fsingle-precision-constant -mword-relocations -fno-unwind-tables CFLAGS += -fno-asynchronous-unwind-tables -ftree-vectorize -funroll-loops - CFLAGS += -fno-optimize-sibling-calls + CFLAGS += -fno-optimize-sibling-calls CFLAGS += -I$(VITASDK)/include -Ifrontend/vita CFLAGS += -DNO_SOCKET -DNO_OS -DNO_DYLIB ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon @@ -170,7 +177,7 @@ else ifeq ($(platform), ctr) CFLAGS += -Werror=implicit-function-declaration # CFLAGS += -DPCSX - BUILTIN_GPU = unai +# BUILTIN_GPU = unai USE_DYNAREC = 1 DRC_CACHE_BASE = 0 ARCH = arm @@ -211,10 +218,11 @@ else ifeq ($(platform), qnx) BUILTIN_GPU = neon ARCH = arm CFLAGS += -D__BLACKBERRY_QNX__ -marm -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp - ASFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp + ASFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp MAIN_LDLIBS += -lsocket LIBPTHREAD := LIBDL := + LIBM := #Raspberry Pi 2 else ifeq ($(platform), rpi2) @@ -263,13 +271,13 @@ else ifeq ($(platform), classic_armv7_a7) BUILTIN_GPU = neon USE_DYNAREC = 1 ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1) - CFLAGS += -march=armv7-a + CFLAGS += -march=armv7-a else - CFLAGS += -march=armv7ve - # If gcc is 5.0 or later - ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1) - LDFLAGS += -static-libgcc -static-libstdc++ - endif + CFLAGS += -march=armv7ve + # If gcc is 5.0 or later + ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1) + LDFLAGS += -static-libgcc -static-libstdc++ + endif endif ####################################### @@ -277,7 +285,9 @@ else ifeq ($(platform), classic_armv7_a7) else ifneq (,$(findstring armv,$(platform))) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC + HAVE_NEON = 0 DRC_CACHE_BASE = 0 + BUILTIN_GPU = peops ifneq (,$(findstring cortexa8,$(platform))) CFLAGS += -marm -mcpu=cortex-a8 ASFLAGS += -mcpu=cortex-a8 @@ -309,19 +319,20 @@ else ifneq (,$(findstring armv,$(platform))) # Windows else TARGET := $(TARGET_NAME)_libretro.dll - BUILTIN_GPU = peops - PLATFORM = libretro + BUILTIN_GPU = peops + PLATFORM = libretro MAIN_LDFLAGS += -static-libgcc -static-libstdc++ -s CFLAGS += -D__WIN32__ -DNO_DYLIB MMAP_WIN32=1 MAIN_LDLIBS += -lws2_32 LIBPTHREAD := LIBDL := + LIBM := endif CFLAGS += $(fpic) MAIN_LDFLAGS += -shared -MAIN_LDLIBS += $(LIBPTHREAD) $(LIBDL) $(LIBZ) +MAIN_LDLIBS += $(LIBPTHREAD) $(LIBM) $(LIBDL) $(LIBZ) # try to autodetect stuff for the lazy ifndef ARCH @@ -334,17 +345,6 @@ ifeq ($(NO_UNDEF_CHECK)$(shell ld -v 2> /dev/null | awk '{print $$1}'),GNU) MAIN_LDFLAGS += -Wl,--no-undefined endif -# 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 @@ -352,13 +352,14 @@ SOUND_DRIVERS = libretro PLUGINS = NO_CONFIG_MAK = yes -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) -endif -endif +# 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) +#endif +#endif include Makefile