notaz.gp2x.de
/
picodrive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add OSX version minor detection to Makefile
[picodrive.git]
/
Makefile.libretro
diff --git
a/Makefile.libretro
b/Makefile.libretro
index
1c7207c
..
87d8272
100644
(file)
--- a/
Makefile.libretro
+++ b/
Makefile.libretro
@@
-8,6
+8,10
@@
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
+ arch = intel
+ifeq ($(shell uname -p),powerpc)
+ arch = ppc
+endif
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
@@
-35,26
+39,45
@@
ifeq ($(platform), unix)
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
SHARED := -dynamiclib
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
SHARED := -dynamiclib
+ APPLE := 1
+
+ arch = intel
+ifeq ($(shell uname -p),powerpc)
+ arch = ppc
+endif
+
+ifeq ($(arch),ppc)
+ CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS
+endif
+OSXVER = `sw_vers -productVersion | cut -c 4`
+ifneq ($(OSXVER),9)
+ SHARED += -mmacosx-version-min=10.5
+endif
else ifeq ($(platform), ios)
TARGET := $(TARGET_NAME)_libretro_ios.dylib
SHARED := -dynamiclib
else ifeq ($(platform), ios)
TARGET := $(TARGET_NAME)_libretro_ios.dylib
SHARED := -dynamiclib
+ APPLE := 1
CC = clang -arch armv7 -isysroot $(IOSSDK)
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
CC = clang -arch armv7 -isysroot $(IOSSDK)
CXX = clang++ -arch armv7 -isysroot $(IOSSDK)
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
- CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm
+ CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm
ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
CFLAGS += -DIOS
ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
CFLAGS += -DIOS
+OSXVER = `sw_vers -productVersion | cut -c 4`
+ifneq ($(OSXVER),9)
+ 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
ARCH := arm
ARCH := arm
- HAVE_NEON = 0
- USE_DYNAREC = 0
- use_fame = 1
- use_cz80 = 1
- use_sh2mame = 1
use_cyclone = 0
use_cyclone = 0
+ use_fame = 1
use_drz80 = 0
use_drz80 = 0
+ use_cz80 = 1
use_sh2drc = 1
use_svpdrc = 1
use_sh2drc = 1
use_svpdrc = 1
@@
-62,22
+85,82
@@
else ifeq ($(platform), ps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
- CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
+ CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS
+ STATIC_LINKING = 1
+ NO_MMAP = 1
+ DONT_COMPILE_IN_ZLIB = 1
+
+ asm_memory = 0
+ asm_render = 0
+ asm_ym2612 = 0
+ asm_misc = 0
+ asm_cdpico = 0
+ asm_cdmemory = 0
+ asm_mix = 0
+ use_cyclone = 0
+ use_fame = 1
+ use_drz80 = 0
+ use_cz80 = 1
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
else ifeq ($(platform), sncps3)
TARGET := $(TARGET_NAME)_libretro_ps3.a
CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
- CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
+ CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS
+ STATIC_LINKING = 1
+ NO_MMAP = 1
+ DONT_COMPILE_IN_ZLIB = 1
+
+ asm_memory = 0
+ asm_render = 0
+ asm_ym2612 = 0
+ asm_misc = 0
+ asm_cdpico = 0
+ asm_cdmemory = 0
+ asm_mix = 0
+ use_cyclone = 0
+ use_fame = 1
+ use_drz80 = 0
+ use_cz80 = 1
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_psl1ght.a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
else ifeq ($(platform), psl1ght)
TARGET := $(TARGET_NAME)_libretro_psl1ght.a
CC = $(PS3DEV)/ppu/bin/ppu-gcc$(EXE_EXT)
AR = $(PS3DEV)/ppu/bin/ppu-ar$(EXE_EXT)
- CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__
+ CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DFAMEC_NO_GOTOS
+ STATIC_LINKING = 1
+ NO_MMAP = 1
+ DONT_COMPILE_IN_ZLIB = 1
+
+ asm_memory = 0
+ asm_render = 0
+ asm_ym2612 = 0
+ asm_misc = 0
+ asm_cdpico = 0
+ asm_cdmemory = 0
+ asm_mix = 0
+ use_cyclone = 0
+ use_fame = 1
+ use_drz80 = 0
+ use_cz80 = 1
else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_libretro_psp1.a
CC = psp-gcc$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_libretro_psp1.a
CC = psp-gcc$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
- CFLAGS += -DPSP -G0
+ CFLAGS += -G0
+ STATIC_LINKING = 1
+ NO_MMAP = 1
+ DONT_COMPILE_IN_ZLIB = 1
+
+ asm_memory = 0
+ asm_render = 0
+ asm_ym2612 = 0
+ asm_misc = 0
+ asm_cdpico = 0
+ asm_cdmemory = 0
+ asm_mix = 0
+ use_cyclone = 0
+ use_fame = 1
+ use_drz80 = 0
+ use_cz80 = 1
else ifeq ($(platform), xenon)
TARGET := $(TARGET_NAME)_libretro_xenon360.a
CC = xenon-gcc$(EXE_EXT)
else ifeq ($(platform), xenon)
TARGET := $(TARGET_NAME)_libretro_xenon360.a
CC = xenon-gcc$(EXE_EXT)
@@
-101,9
+184,7
@@
else ifeq ($(platform), qnx)
ASFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
ARCH = arm
ASFLAGS += -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp
ARCH = arm
- HAVE_NEON = 1
ARM_ASM = 1
ARM_ASM = 1
- USE_DYNAREC = 1
else ifneq (,$(findstring armv,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
SHARED := -shared -Wl,--no-undefined
else ifneq (,$(findstring armv,$(platform)))
TARGET := $(TARGET_NAME)_libretro.so
SHARED := -shared -Wl,--no-undefined
@@
-118,7
+199,6
@@
endif
ifneq (,$(findstring neon,$(platform)))
CFLAGS += -mfpu=neon
ASFLAGS += -mfpu=neon
ifneq (,$(findstring neon,$(platform)))
CFLAGS += -mfpu=neon
ASFLAGS += -mfpu=neon
- HAVE_NEON = 1
endif
ifneq (,$(findstring softfloat,$(platform)))
CFLAGS += -mfloat-abi=softfp
endif
ifneq (,$(findstring softfloat,$(platform)))
CFLAGS += -mfloat-abi=softfp
@@
-131,7
+211,6
@@
ifneq (,$(findstring armasm,$(platform)))
ARM_ASM = 1
endif
ARCH = arm
ARM_ASM = 1
endif
ARCH = arm
- USE_DYNAREC = 1
else
TARGET := $(TARGET_NAME)_retro.dll
CC = gcc
else
TARGET := $(TARGET_NAME)_retro.dll
CC = gcc
@@
-140,6
+219,12
@@
else
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
CFLAGS += -D__WIN32__ -D__WIN32_LIBRETRO__
endif
+CFLAGS += -DNO_ZLIB
+
+ifeq ($(NO_MMAP),1)
+CFLAGS += -DNO_MMAP
+endif
+
ifeq ($(ARM_ASM),1)
asm_memory = 1
asm_render = 1
ifeq ($(ARM_ASM),1)
asm_memory = 1
asm_render = 1