Merge pull request #6 from tobiasjakobi/memalign
[pcsx_rearmed.git] / Makefile.libretro
index 73faa5c..62044b4 100644 (file)
@@ -25,20 +25,24 @@ ifeq ($(platform), unix)
    TARGET := $(TARGET_NAME)_libretro.so
    fpic := -fPIC
    SHARED := -shared -Wl,--version-script=libretro/link.T
+   BUILTIN_GPU = neon
+       CFLAGS += -DNEON_PC
 else ifeq ($(platform), osx)
    TARGET := $(TARGET_NAME)_libretro.dylib
-   fpic := -fPIC
+   fpic := -fPIC -mmacosx-version-min=10.6
    SHARED := -dynamiclib
+   BUILTIN_GPU = neon
+       CFLAGS += -DNEON_PC
 else ifeq ($(platform), ios)
 ARCH := arm
    TARGET := $(TARGET_NAME)_libretro_ios.dylib
    fpic := -fPIC
    SHARED := -dynamiclib
 
-   CC = clang -arch armv7 -isysroot $(IOSSDK) -miphone-version-min=5.0
-   CXX = clang++ -arch armv7 -isysroot $(IOSSDK) -miphone-version-min=5.0
-   CC_AS = perl ./tools/gas-preprocessor.pl $(CC) -miphone-version-min=5.0
-   CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm -miphone-version-min=5.0
+   CC = clang -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0
+   CXX = clang++ -arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=5.0
+   CC_AS = perl ./tools/gas-preprocessor.pl $(CC) -miphoneos-version-min=5.0
+   CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm -miphoneos-version-min=5.0
    ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
    HAVE_NEON = 1
    BUILTIN_GPU = neon
@@ -124,6 +128,8 @@ else
    LD_FLAGS := -fPIC
    SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=libretro/link.T
    CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
+   BUILTIN_GPU = neon
+       CFLAGS += -DNEON_PC
 endif
 
 CFLAGS += -fPIC
@@ -144,11 +150,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 $@