X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=Makefile.libretro;h=a8f63faa6dba214d626dff5cd90e1a1423abb09b;hp=9436c8a3b0bbf0ad0a75464a8cac1814e5e21347;hb=4e47706596441172d1cc3f203b8baa398cea3023;hpb=aa0e931b7dbd98359d3b0aa0db16c4d2ee8ca197 diff --git a/Makefile.libretro b/Makefile.libretro index 9436c8a3..a8f63faa 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -21,6 +21,8 @@ CFLAGS ?= TARGET_NAME := pcsx_rearmed +MMAP_WIN32=0 + ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC @@ -29,12 +31,21 @@ else ifeq ($(platform), osx) TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC SHARED := -dynamiclib + OSXVER = `sw_vers -productVersion | cut -d. -f 2` + OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` +ifeq ($(OSX_LT_MAVERICKS),"YES") + fpic += -mmacosx-version-min=10.5 +endif else ifeq ($(platform), ios) ARCH := arm TARGET := $(TARGET_NAME)_libretro_ios.dylib fpic := -fPIC SHARED := -dynamiclib +ifeq ($(IOSSDK),) + IOSSDK := $(shell xcrun -sdk iphoneos -show-sdk-path) +endif + CC = clang -arch armv7 -isysroot $(IOSSDK) CXX = clang++ -arch armv7 -isysroot $(IOSSDK) CC_AS = perl ./tools/gas-preprocessor.pl $(CC) @@ -44,6 +55,14 @@ ARCH := arm BUILTIN_GPU = neon USE_DYNAREC = 1 CFLAGS += -DIOS + OSXVER = `sw_vers -productVersion | cut -d. -f 2` + OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` +ifeq ($(OSX_LT_MAVERICKS),"YES") + CC += -miphoneos-version-min=5.0 + CXX += -miphoneos-version-min=5.0 + CC_AS += -miphoneos-version-min=5.0 + CFLAGS += -miphoneos-version-min=5.0 +endif else ifeq ($(platform), ps3) TARGET := $(TARGET_NAME)_libretro_ps3.a CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe @@ -90,22 +109,41 @@ else ifeq ($(platform), qnx) ARCH = arm 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 -else ifeq ($(platform), arm) +else ifneq (,$(findstring armv,$(platform))) TARGET := $(TARGET_NAME)_libretro.so - HAVE_NEON = 1 - USE_DYNAREC = 1 + SHARED := -shared -Wl,--no-undefined DRC_CACHE_BASE = 0 +ifneq (,$(findstring cortexa8,$(platform))) + CFLAGS += -marm -mcpu=cortex-a8 + ASFLAGS += -mcpu=cortex-a8 +else ifneq (,$(findstring cortexa9,$(platform))) + CFLAGS += -marm -mcpu=cortex-a9 + ASFLAGS += -mcpu=cortex-a9 +endif + CFLAGS += -marm +ifneq (,$(findstring neon,$(platform))) + CFLAGS += -mfpu=neon + ASFLAGS += -mfpu=neon + HAVE_NEON = 1 BUILTIN_GPU = neon +endif +ifneq (,$(findstring softfloat,$(platform))) + CFLAGS += -mfloat-abi=softfp + ASFLAGS += -mfloat-abi=softfp +else ifneq (,$(findstring hardfloat,$(platform))) + CFLAGS += -mfloat-abi=hard + ASFLAGS += -mfloat-abi=hard +endif ARCH = arm - CFLAGS += -marm -mcpu=cortex-a8 -mfpu=neon - ASFLAGS += -mcpu=cortex-a8 -mfpu=neon + USE_DYNAREC = 1 else - TARGET := $(TARGET_NAME)_retro.dll + TARGET := $(TARGET_NAME)_libretro.dll CC = gcc fpic := -fPIC LD_FLAGS := -fPIC SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=libretro/link.T CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__ + MMAP_WIN32=1 endif CFLAGS += -fPIC @@ -126,11 +164,6 @@ NO_CONFIG_MAK = yes include Makefile -# workaround segfault for this file seen on: -# Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) -libpcsxcore/new_dynarec/pcsxmem.o: libpcsxcore/new_dynarec/pcsxmem.c - $(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) -Os - # no special AS needed for gpu_neon plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.o: plugins/gpu_neon/psx_gpu/psx_gpu_arm_neon.S $(CC) $(CFLAGS) -c $^ -o $@